aesTransform - encrypt or decrypt (according to "direction") using block cipher "bc" (typically AES)
| 110 | // aesTransform - encrypt or decrypt (according to "direction") using block |
| 111 | // cipher "bc" (typically AES) |
| 112 | static void aesTransform(BYTE* dst, const BYTE* src, bool direction, int len, const EmeCryptContext *eme_context) { |
| 113 | if (direction == DirectionEncrypt) { |
| 114 | AesEncrypt(dst, src, len, eme_context); |
| 115 | return; |
| 116 | } |
| 117 | else if (direction == DirectionDecrypt) { |
| 118 | AesDecrypt(dst, src, len, eme_context); |
| 119 | return; |
| 120 | } |
| 121 | else { |
| 122 | panic(L"unknown direction"); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | EmeCryptContext::EmeCryptContext() |
| 127 | { |
no test coverage detected