[ ] AES 128 ECB |
: 1) 16- state 16- ; 2) ( ); 3) n ( n - ). . .
:
using byte_t = unsigned char;
struct aes128 {
aes128(const std::string& text, const std::string& cipher, bool decrypt = false)
: state({begin(text), end(text)}), keys({{begin(cipher), end(cipher)}}), decrypt(decrypt) {}
aes128() = default;
aes128(const aes128&) = default;
std::vector state;
std::vector> keys;
bool decrypt;
}
-> https://habr.com/ru/post/451830/?utm_source=habrahabr&utm_medium=rss&utm_campaign=451830