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

Function getIv

TactilityCore/Source/crypt/Crypt.cpp:130–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void getIv(const void* data, size_t dataLength, uint8_t iv[16]) {
131 memset(iv, 0, 16);
132 auto* data_bytes = (uint8_t*)data;
133 for (int i = 0; i < dataLength; ++i) {
134 size_t safe_index = i % 16;
135 iv[safe_index] %= data_bytes[i];
136 }
137}
138
139static int aes256CryptCbc(
140 const uint8_t key[32],

Callers 4

encryptFunction · 0.85
decryptFunction · 0.85
encryptKeyFunction · 0.85
decryptKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected