diff options
author | Jacob Trimble <modmaker-at-google.com@ffmpeg.org> | 2018-01-08 14:12:43 -0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-01-23 21:48:31 +0100 |
commit | 9f07cf7c00f3a87669c27aec947daf0f3d33b01f (patch) | |
tree | 313b8091795c0299baec9c8412838af60b799931 /libavutil/aes_ctr.c | |
parent | 9b1ec248350405e1da64eecad620a8d7a4ee6caa (diff) | |
download | ffmpeg-9f07cf7c00f3a87669c27aec947daf0f3d33b01f.tar.gz |
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>
Diffstat (limited to 'libavutil/aes_ctr.c')
-rw-r--r-- | libavutil/aes_ctr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/aes_ctr.c b/libavutil/aes_ctr.c index e9c568fe0d..0c2e86785f 100644 --- a/libavutil/aes_ctr.c +++ b/libavutil/aes_ctr.c @@ -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; |