| 30 | } |
| 31 | |
| 32 | static inline Standalone<StringRef> encrypt(const StreamCipherKey* const key, |
| 33 | const StreamCipher::IV& iv, |
| 34 | unsigned char const* data, |
| 35 | size_t len) { |
| 36 | EncryptionStreamCipher encryptor(key, iv); |
| 37 | Arena arena; |
| 38 | auto encrypted = encryptor.encrypt(data, len, arena); |
| 39 | return Standalone<StringRef>(encrypted, arena); |
| 40 | } |
| 41 | |
| 42 | static void bench_encrypt(benchmark::State& state) { |
| 43 | auto bytes = state.range(0); |
no test coverage detected