diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-10-08 11:59:44 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-10-08 11:59:44 +0200 |
commit | 113f90b689af1d7169df9db5d7e84443972b5f68 (patch) | |
tree | 06cea871ae704f5cb335ea2381fa5dd98e9e62d3 /envelope.h | |
parent | ddeae250bc6661daafb25ae07f8c2e01b53b0d44 (diff) |
Add digital envelope encryption
Diffstat (limited to 'envelope.h')
-rw-r--r-- | envelope.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/envelope.h b/envelope.h new file mode 100644 index 0000000..a72a7ad --- /dev/null +++ b/envelope.h @@ -0,0 +1,13 @@ +#pragma once + +#include <string> +#include "rsa.h" + +namespace Envelope{ + + std::string encrypt(const std::string &data,const RSA::PublicKey &pubkey); + + //throws invalid_argument for an invalid ciphertext (length invalid) + std::string decrypt(const std::string &data,const RSA::PrivateKey &privkey); + +} |