Key handling cleanup, now using libsodium's secure memory allocation

This commit is contained in:
Ian Gulliver
2015-02-08 19:02:37 +00:00
parent bcfe496fb1
commit 52ee93708d
6 changed files with 182 additions and 96 deletions

View File

@@ -21,8 +21,10 @@ int main(int argc, char *argv[]) {
}
}
std::string secret_key;
CryptoUtil::ReadKeyFromFile(secret_key_filename, &secret_key);
sodium_init();
SecretKey secret_key;
secret_key.ReadFromFile(secret_key_filename);
CryptoPubServer server(secret_key);
server.Loop();