From ea671f5d67f973578ac83de8d4ae086122cb571d Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Thu, 30 Jun 2016 23:02:40 +0300 Subject: [PATCH] sxt: added import API desc.; --- include/sxt/sxtkey.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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.