| 15 | DataEncryptor::DataEncryptor(const snap::utils::crypto::AesEncryptor::Key& key) : _key(key) {} |
| 16 | |
| 17 | static bssl::Span<uint8_t> toSpan(const Byte* data, size_t length) { |
| 18 | return bssl::Span<uint8_t>(const_cast<uint8_t*>(data), length); |
| 19 | } |
| 20 | |
| 21 | bool DataEncryptor::encrypt(const Byte* data, size_t length, ByteBuffer& out) const { |
| 22 | snap::utils::crypto::AesEncryptor::Iv iv; |