Skip to content

Commit

Permalink
make aes iv big-endian
Browse files Browse the repository at this point in the history
  • Loading branch information
arut committed Aug 31, 2014
1 parent 4bed919 commit 773336e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hls/ngx_rtmp_mpegts.c
Expand Up @@ -290,7 +290,15 @@ ngx_rtmp_mpegts_init_encryption(ngx_rtmp_mpegts_file_t *file,
}

ngx_memzero(file->iv, 8);
ngx_memcpy(file->iv + 8, &iv, 8);

file->iv[8] = iv >> 56;
file->iv[9] = iv >> 48;
file->iv[10] = iv >> 40;
file->iv[11] = iv >> 32;
file->iv[12] = iv >> 24;
file->iv[13] = iv >> 16;
file->iv[14] = iv >> 8;
file->iv[15] = iv;

file->encrypt = 1;

Expand Down

0 comments on commit 773336e

Please sign in to comment.