MCPcopy Create free account
hub / github.com/Snapchat/Valdi / generateCryptoKey

Method generateCryptoKey

valdi/src/valdi/runtime/Resources/EncryptedDiskCache.cpp:134–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void EncryptedDiskCache::generateCryptoKey(const StringBox& path) {
135 auto key = DataEncryptor::generateKey();
136 _cryptoKey = {key};
137 _keychain->store(path,
138 makeShared<ByteBuffer>(reinterpret_cast<const Byte*>(key.data()),
139 reinterpret_cast<const Byte*>(key.data()) + key.size())
140 ->toBytesView());
141}
142
143} // namespace Valdi

Callers

nothing calls this directly

Calls 4

storeMethod · 0.65
toBytesViewMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected