avutil/aes_ctr: Add method to set 16-byte IV.
Signed-off-by: Jacob Trimble <modmaker@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9b1ec24835
commit
9f07cf7c00
4 changed files with 16 additions and 2 deletions
|
|
@ -45,6 +45,12 @@ void av_aes_ctr_set_iv(struct AVAESCTR *a, const uint8_t* iv)
|
|||
a->block_offset = 0;
|
||||
}
|
||||
|
||||
void av_aes_ctr_set_full_iv(struct AVAESCTR *a, const uint8_t* iv)
|
||||
{
|
||||
memcpy(a->counter, iv, sizeof(a->counter));
|
||||
a->block_offset = 0;
|
||||
}
|
||||
|
||||
const uint8_t* av_aes_ctr_get_iv(struct AVAESCTR *a)
|
||||
{
|
||||
return a->counter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue