| 33 | #include <cstring> |
| 34 | |
| 35 | Aes_ctr_encryptor::Aes_ctr_encryptor (const unsigned char* raw_key, const unsigned char* nonce) |
| 36 | : ecb(raw_key) |
| 37 | { |
| 38 | // Set first 12 bytes of the CTR value to the nonce. |
| 39 | // This stays the same for the entirety of this object's lifetime. |
| 40 | std::memcpy(ctr_value, nonce, NONCE_LEN); |
| 41 | byte_counter = 0; |
| 42 | } |
| 43 | |
| 44 | Aes_ctr_encryptor::~Aes_ctr_encryptor () |
| 45 | { |
nothing calls this directly
no outgoing calls
no test coverage detected