Unified · Split
| @@ -15,6 +15,9 @@ libavutil: 2017-10-21 · 14 unmodified lines | ||
| 15 | 15 | |
| 16 | 16 | API changes, most recent first: |
| 17 | 17 | |
| 18 | +2018-xx-xx - xxxxxxx - lavu 56.9.100 - aes_ctr.h | |
| 19 | + Add method to set the 16-byte IV. | |
| 20 | + | |
| 18 | 21 | 2018-01-xx - xxxxxxx - lavf 58.5.100 - avformat.h |
| 19 | 22 | Explicitly make avformat_network_init() and avformat_network_deinit() optional. |
| 20 | 23 | If these are not called, network initialization and deinitialization is |
| @@ -45,6 +45,12 @@ void av_aes_ctr_set_iv(struct AVAESCTR *a, const uint8_t* iv) · 44 unmodified lines | ||
| 45 | 45 | a->block_offset = 0; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | +void av_aes_ctr_set_full_iv(struct AVAESCTR *a, const uint8_t* iv) | |
| 49 | +{ | |
| 50 | + memcpy(a->counter, iv, sizeof(a->counter)); | |
| 51 | + a->block_offset = 0; | |
| 52 | +} | |
| 53 | + | |
| 48 | 54 | const uint8_t* av_aes_ctr_get_iv(struct AVAESCTR *a) |
| 49 | 55 | { |
| 50 | 56 | return a->counter; |
| @@ -67,10 +67,15 @@ const uint8_t* av_aes_ctr_get_iv(struct AVAESCTR *a); · 66 unmodified lines | ||
| 67 | 67 | void av_aes_ctr_set_random_iv(struct AVAESCTR *a); |
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | − * Forcefully change the iv | |
| 70 | + * Forcefully change the 8-byte iv | |
| 71 | 71 | */ |
| 72 | 72 | void av_aes_ctr_set_iv(struct AVAESCTR *a, const uint8_t* iv); |
| 73 | 73 | |
| 74 | +/** | |
| 75 | + * Forcefully change the "full" 16-byte iv, including the counter | |
| 76 | + */ | |
| 77 | +void av_aes_ctr_set_full_iv(struct AVAESCTR *a, const uint8_t* iv); | |
| 78 | + | |
| 74 | 79 | /** |
| 75 | 80 | * Increment the top 64 bit of the iv (performed after each frame) |
| 76 | 81 | */ |
| @@ -45,7 +45,7 @@ int main (void) · 44 unmodified lines | ||
| 45 | 45 | |
| 46 | 46 | av_aes_ctr_set_random_iv(ae); |
| 47 | 47 | iv = av_aes_ctr_get_iv(ae); |
| 48 | − av_aes_ctr_set_iv(ad, iv); | |
| 48 | + av_aes_ctr_set_full_iv(ad, iv); | |
| 49 | 49 | |
| 50 | 50 | av_aes_ctr_crypt(ae, tmp, plain, sizeof(tmp)); |
| 51 | 51 | av_aes_ctr_crypt(ad, tmp, tmp, sizeof(tmp)); |