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

Function aesTransform

libcppcryptfs/crypt/eme.cpp:112–124  ·  view source on GitHub ↗

aesTransform - encrypt or decrypt (according to "direction") using block cipher "bc" (typically AES)

Source from the content-addressed store, hash-verified

110// aesTransform - encrypt or decrypt (according to "direction") using block
111// cipher "bc" (typically AES)
112static 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
126EmeCryptContext::EmeCryptContext()
127{

Callers 1

EmeTransformFunction · 0.85

Calls 3

AesEncryptFunction · 0.85
AesDecryptFunction · 0.85
panicFunction · 0.85

Tested by

no test coverage detected