From 8be2e817136d509f9e9163977cbd01cecf2f35e1 Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Sun, 26 Jun 2016 04:30:25 +0300 Subject: [PATCH] sxt: duplication/convertation API desc. added; --- include/sxt/sxtkey.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/sxt/sxtkey.h b/include/sxt/sxtkey.h index b1dc5db..29acb63 100644 --- a/include/sxt/sxtkey.h +++ b/include/sxt/sxtkey.h @@ -90,6 +90,16 @@ int sxt_key_public(const sxtkey_t *); /* return 0 if key isn't private, 1 otherwise */ int sxt_key_private(const sxtkey_t *); +/* duplication/convertion API */ +/* will duplicate a key depends on it's kind */ +int sxt_key_dup(const sxtkey_t *, sxtkey_t **); + +/* will duplicate public key, if key was private or pair - it becomes public */ +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 **); + /* export key API */ /** this function will pack the private key to sxt key container and * write it to the file.