MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / decrypt

Function decrypt

TactilityCore/Source/crypt/Crypt.cpp:177–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177int decrypt(const uint8_t iv[16], const uint8_t* inData, uint8_t* outData, size_t dataLength) {
178 check(dataLength % 16 == 0, "Length is not a multiple of 16 bytes (for AES 256)");
179 uint8_t key[32];
180 getKey(key);
181
182 // TODO: Is this still needed after switching to regular AES functions?
183 uint8_t iv_copy[16];
184 memcpy(iv_copy, iv, sizeof(iv_copy));
185
186 return aes256CryptCbc(key, MBEDTLS_AES_DECRYPT, dataLength, iv_copy, inData, outData);
187}
188
189} // namespace

Callers

nothing calls this directly

Calls 3

getKeyFunction · 0.85
aes256CryptCbcFunction · 0.85
checkFunction · 0.50

Tested by

no test coverage detected