MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / AES

Class AES

libcppcryptfs/crypt/aes.h:41–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39// this class is used by aes-siv and eme
40
41class AES
42{
43public:
44 // expanded aes keys are stored elsewhere (preferably in a LockZeroBuffer)
45 static void initialize_keys(const unsigned char *key, int keylen /* in bits */,
46 AES_KEY *encrypt_key, AES_KEY *decrypt_key);
47
48 void set_keys(const AES_KEY *key_encrypt, const AES_KEY *key_decrypt);
49
50 // encrypt single AES block (16 bytes)
51 void encrypt(const unsigned char* plain, unsigned char *cipher) const;
52
53 // decrypt single AES block (16 bytes)
54 void decrypt(const unsigned char *cipher, unsigned char *plain) const;
55
56
57 // disallow copying
58 AES(AES const&) = delete;
59 void operator=(AES const&) = delete;
60 AES();
61
62 virtual ~AES();
63
64 const AES_KEY *m_key_encrypt;
65 const AES_KEY *m_key_decrypt;
66
67 public:
68 static bool use_aes_ni();
69
70private:
71 bool m_use_aes_ni;
72};
73
74

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected