MCPcopy Create free account
hub / github.com/Tencent/MMKV / fillRandomIV

Method fillRandomIV

Core/aes/AESCrypt.cpp:112–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void AESCrypt::fillRandomIV(void *vector) {
113 if (!vector) {
114 return;
115 }
116 srand((unsigned) time(nullptr));
117 int *ptr = (int *) vector;
118 for (uint32_t i = 0; i < AES_IV_LEN / sizeof(int); i++) {
119 ptr[i] = rand();
120 }
121}
122
123static inline void
124Rollback_cfb_decrypt(const uint8_t *input, const uint8_t *output, size_t len, AES_KEY *key, AESCryptStatus &status) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected