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

Method encrypt

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

Source from the content-addressed store, hash-verified

77}
78
79Result<BytesView> EncryptedDiskCache::encrypt(const BytesView& input) {
80 auto out = makeShared<ByteBuffer>();
81
82 if (!getDataEncryptor().encrypt(input.data(), input.size(), *out)) {
83 return Error("Failed to encrypt data");
84 }
85
86 return out->toBytesView();
87}
88
89Result<BytesView> EncryptedDiskCache::decrypt(const BytesView& input) {
90 auto out = makeShared<ByteBuffer>();

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