// Copyright 2020 Google LLC. All Rights Reserved. #ifndef WHITEBOX_CRYPTO_UTILS_AES_CBC_ENCRYPTOR_H_ #define WHITEBOX_CRYPTO_UTILS_AES_CBC_ENCRYPTOR_H_ #include #include #include "third_party/boringssl/src/include/openssl/aes.h" namespace widevine { class AesCbcEncryptor { public: // Prepares the encryptor with the key. virtual bool SetKey(const uint8_t* key, size_t key_size); // Puts the encrypted result of |input_data| into |output_data|. virtual bool Encrypt(const uint8_t* iv, size_t iv_size, const uint8_t* input_data, size_t input_data_size, uint8_t* output_data); private: AES_KEY aes_key_; size_t aes_key_size_ = 0; }; } // namespace widevine #endif // WHITEBOX_CRYPTO_UTILS_AES_CBC_ENCRYPTOR_H_