blob: b2064f2786c8beac8244c8186c60b66775fe6766 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#pragma once
#include <string>
namespace AES{
enum Algorithm{
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();
}
|