|
| | AesCbcEncryptor (CbcPaddingScheme padding_scheme) |
| |
| | AesCbcEncryptor (CbcPaddingScheme padding_scheme, ConstantIvFlag constant_iv_flag) |
| |
| bool | InitializeWithIv (const std::vector< uint8_t > &key, const std::vector< uint8_t > &iv) override |
| |
| size_t | RequiredOutputSize (size_t plaintext_size) override |
| |
| | AesCryptor (ConstantIvFlag constant_iv_flag) |
| |
| bool | SetIv (const std::vector< uint8_t > &iv) |
| |
| void | UpdateIv () |
| |
| const std::vector< uint8_t > & | iv () const |
| |
| bool | use_constant_iv () const |
| |
| bool | Crypt (const std::vector< uint8_t > &text, std::vector< uint8_t > *crypt_text) |
| |
| bool | Crypt (const std::string &text, std::string *crypt_text) |
| |
| bool | Crypt (const uint8_t *text, size_t text_size, uint8_t *crypt_text) |
| |
| bool | Crypt (const uint8_t *text, size_t text_size, uint8_t *crypt_text, size_t *crypt_text_size) |
| |
|
| enum | ConstantIvFlag { kUseConstantIv
, kDontUseConstantIv
} |
| |
| static bool | GenerateRandomIv (FourCC protection_scheme, std::vector< uint8_t > *iv) |
| |
| enum | CipherMode { kCtrMode
, kCbcMode
} |
| |
| bool | SetupCipher (size_t key_size, CipherMode mode) |
| |
| mbedtls_cipher_context_t | cipher_ctx_ |
| |
Definition at line 62 of file aes_encryptor.h.
◆ AesCbcEncryptor() [1/2]
| shaka::media::AesCbcEncryptor::AesCbcEncryptor |
( |
CbcPaddingScheme |
padding_scheme | ) |
|
|
explicit |
Creates a AesCbcEncryptor with continous cipher block chain across Crypt calls, i.e. AesCbcEncryptor(padding_scheme, kDontUseConstantIv).
- Parameters
-
| padding_scheme | indicates the padding scheme used. Currently supported schemes: kNoPadding, kPkcs5Padding, kCtsPadding. |
Definition at line 99 of file aes_encryptor.cc.
◆ AesCbcEncryptor() [2/2]
| shaka::media::AesCbcEncryptor::AesCbcEncryptor |
( |
CbcPaddingScheme |
padding_scheme, |
|
|
ConstantIvFlag |
constant_iv_flag |
|
) |
| |
- Parameters
-
| padding_scheme | indicates the padding scheme used. Currently supported schemes: kNoPadding, kPkcs5Padding, kCtsPadding. |
| constant_iv_flag | indicates whether a constant iv is used, kUseConstantIv means that the same iv is used for all Crypt calls until iv is changed via SetIv; otherwise, iv is updated internally and there is a continuous cipher block chain across Crypt calls util iv is changed explicitly via SetIv or UpdateIv functions. |
Definition at line 102 of file aes_encryptor.cc.
◆ ~AesCbcEncryptor()
| shaka::media::AesCbcEncryptor::~AesCbcEncryptor |
( |
| ) |
|
|
override |
◆ InitializeWithIv()
| bool shaka::media::AesCbcEncryptor::InitializeWithIv |
( |
const std::vector< uint8_t > & |
key, |
|
|
const std::vector< uint8_t > & |
iv |
|
) |
| |
|
overridevirtual |
◆ RequiredOutputSize()
| size_t shaka::media::AesCbcEncryptor::RequiredOutputSize |
( |
size_t |
plaintext_size | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: