1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

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:
Jacob Trimble
2018-01-08 14:12:43 -08:00
committed by Michael Niedermayer
parent 9b1ec24835
commit 9f07cf7c00
4 changed files with 16 additions and 2 deletions

View File

@@ -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;