encrypt single AES block (16 bytes)
| 102 | |
| 103 | // encrypt single AES block (16 bytes) |
| 104 | void 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) |
| 121 | void AES::decrypt(const unsigned char *cipher, unsigned char *plain) const |
no outgoing calls
no test coverage detected