| 77 | } |
| 78 | |
| 79 | Result<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 | |
| 89 | Result<BytesView> EncryptedDiskCache::decrypt(const BytesView& input) { |
| 90 | auto out = makeShared<ByteBuffer>(); |
nothing calls this directly
no test coverage detected