MCPcopy Create free account
hub / github.com/AGWA/git-crypt / Aes_ctr_encryptor

Method Aes_ctr_encryptor

crypto.cpp:35–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#include <cstring>
34
35Aes_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
44Aes_ctr_encryptor::~Aes_ctr_encryptor ()
45{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected