MCPcopy Create free account
hub / github.com/apple/foundationdb / initializeKey

Method initializeKey

flow/StreamCipher.cpp:67–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void StreamCipherKey::initializeKey(uint8_t* data, int len) {
68 memset(arr.get(), 0, keySize);
69 int copyLen = std::min(keySize, len);
70 memcpy(arr.get(), data, copyLen);
71}
72
73StreamCipherKey::StreamCipherKey(int size)
74 : id(deterministicRandom()->randomUniqueID()), arr(std::make_unique<uint8_t[]>(size)), keySize(size) {

Callers 1

Calls 2

memcpyFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected