diff --git a/include/sxt/sxtkey.h b/include/sxt/sxtkey.h index 2a0e9c3..e6c4694 100644 --- a/include/sxt/sxtkey.h +++ b/include/sxt/sxtkey.h @@ -103,6 +103,18 @@ int sxt_key_dup_public(const sxtkey_t *, sxtkey_t **); /* will duplicate private key, if key public error will returns */ int sxt_key_dup_private(const sxtkey_t *, sxtkey_t **); +/* import key API */ + +/* import a private key, + * the most parameters the same as for export + */ +int sxt_key_import_priv_file(const char *file, const char *passkey, + int (*ask_passkey)(char *pkbuf, size_t length, int confirm, void *priv), + void *priv, sxtkey_t **ik); + +/* import a public key from a given file */ +int sxt_key_import_public_file(const char *file, sxtkey_t **ik); + /* export key API */ /** this function will pack the private key to sxt key container and * write it to the file.