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

Method encrypt

libcppcryptfs/crypt/aes.cpp:104–118  ·  view source on GitHub ↗

encrypt single AES block (16 bytes)

Source from the content-addressed store, hash-verified

102
103// encrypt single AES block (16 bytes)
104void AES::encrypt(const unsigned char* plain, unsigned char *cipher) const
105{
106#ifdef USE_AES_NI
107 if (m_use_aes_ni) {
108 aesni_encrypt(plain, cipher, m_key_encrypt);
109 } else
110#endif
111 {
112// low-level AES functions are deprecated in Openssl 3.0
113#pragma warning( push )
114#pragma warning(disable : 4996)
115 AES_encrypt(plain, cipher, m_key_encrypt);
116#pragma warning( pop )
117 }
118}
119
120// decrypt single AES block (16 bytes)
121void AES::decrypt(const unsigned char *cipher, unsigned char *plain) const

Callers 4

AesEncryptFunction · 0.80
aes256_ctrFunction · 0.80
aes256_cmacFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected