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

Method decrypt

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

Source from the content-addressed store, hash-verified

87}
88
89Result<BytesView> EncryptedDiskCache::decrypt(const BytesView& input) {
90 auto out = makeShared<ByteBuffer>();
91 if (!getDataEncryptor().decrypt(input.data(), input.size(), *out)) {
92 return Error("Failed to derypt data");
93 }
94
95 return out->toBytesView();
96}
97
98StringBox EncryptedDiskCache::getKeychainKey() {
99 return STRING_LITERAL(kKeychainKey);

Callers

nothing calls this directly

Calls 4

ErrorInterface · 0.50
dataMethod · 0.45
sizeMethod · 0.45
toBytesViewMethod · 0.45

Tested by

no test coverage detected