diff options
Diffstat (limited to 'aes.h')
-rw-r--r-- | aes.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -5,12 +5,16 @@ namespace AES{ enum Algorithm{ - AES_128, - AES_192, - AES_256, + AES_128_CBC, + AES_192_CBC, + AES_256_CBC, }; std::string encrypt(const std::string &key,const std::string &data,Algorithm algo); + + //throws invalid_argument for an invalid ciphertext (length not a multiple of block size, or padding malformed) std::string decrypt(const std::string &key,const std::string &data,Algorithm algo); + void test(); + } |