Clean up key file save and load.

This commit is contained in:
Ian Gulliver
2015-02-07 13:25:46 -08:00
parent d90770fabe
commit 55ca78194c
6 changed files with 22 additions and 66 deletions

View File

@@ -13,6 +13,9 @@ class CryptoBase {
static void GenKey(std::string* key);
static void GenKeyPair(std::string* secret_key, std::string* public_key);
static void DerivePublicKey(const std::string& secret_key, std::string* public_key);
static void ReadKeyFromFile(const std::string& filename, std::string* key);
static void WriteKeyToFile(const std::string& filename, const std::string& key);
static void EncodeEncryptAppend(const std::string& secret_key, const std::string& public_key, const TLVNode& input, TLVNode* container);
TLVNode *DecryptDecode(const std::string& secret_key, const std::string& public_key, const TLVNode& input);