From 9f07cf7c00f3a87669c27aec947daf0f3d33b01f Mon Sep 17 00:00:00 2001 From: Jacob Trimble Date: Mon, 8 Jan 2018 14:12:43 -0800 Subject: avutil/aes_ctr: Add method to set 16-byte IV. Signed-off-by: Jacob Trimble Signed-off-by: Michael Niedermayer --- libavutil/aes_ctr.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libavutil/aes_ctr.c') 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; -- cgit v1.2.3