Commit 5b4be0c0 authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit '62b4a6f1'

* commit '62b4a6f1':
  rtmpcrypt: Provide the xtea keys in little endian format for consistency
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents e12f4036 62b4a6f1
...@@ -50,38 +50,38 @@ typedef struct RTMPEContext { ...@@ -50,38 +50,38 @@ typedef struct RTMPEContext {
} RTMPEContext; } RTMPEContext;
static const uint8_t rtmpe8_keys[16][16] = { static const uint8_t rtmpe8_keys[16][16] = {
{ 0xbf, 0xf0, 0x34, 0xb2, 0x11, 0xd9, 0x08, 0x1f, { 0xb2, 0x34, 0xf0, 0xbf, 0x1f, 0x08, 0xd9, 0x11,
0xcc, 0xdf, 0xb7, 0x95, 0x74, 0x8d, 0xe7, 0x32 }, 0x95, 0xb7, 0xdf, 0xcc, 0x32, 0xe7, 0x8d, 0x74 },
{ 0x08, 0x6a, 0x5e, 0xb6, 0x17, 0x43, 0x09, 0x0e, { 0xb6, 0x5e, 0x6a, 0x08, 0x0e, 0x09, 0x43, 0x17,
0x6e, 0xf0, 0x5a, 0xb8, 0xfe, 0x5a, 0x39, 0xe2 }, 0xb8, 0x5a, 0xf0, 0x6e, 0xe2, 0x39, 0x5a, 0xfe },
{ 0x7b, 0x10, 0x95, 0x6f, 0x76, 0xce, 0x05, 0x21, { 0x6f, 0x95, 0x10, 0x7b, 0x21, 0x05, 0xce, 0x76,
0x23, 0x88, 0xa7, 0x3a, 0x44, 0x01, 0x49, 0xa1 }, 0x3a, 0xa7, 0x88, 0x23, 0xa1, 0x49, 0x01, 0x44 },
{ 0xa9, 0x43, 0xf3, 0x17, 0xeb, 0xf1, 0x1b, 0xb2, { 0x17, 0xf3, 0x43, 0xa9, 0xb2, 0x1b, 0xf1, 0xeb,
0xa6, 0x91, 0xa5, 0xee, 0x17, 0xf3, 0x63, 0x39 }, 0xee, 0xa5, 0x91, 0xa6, 0x39, 0x63, 0xf3, 0x17 },
{ 0x7a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, 0x27, 0xcc, 0x30, 0x13, 0xa2, { 0x27, 0x94, 0x3a, 0x89, 0xa2, 0x13, 0x30, 0xcc,
0xf1, 0x06, 0x38, 0x5b, 0xa8, 0x29, 0xf9, 0x27 } 0x5b, 0x38, 0x06, 0xf1, 0x27, 0xf9, 0x29, 0xa8 }
}; };
static const uint8_t rtmpe9_keys[16][24] = { static const uint8_t rtmpe9_keys[16][24] = {
...@@ -185,7 +185,7 @@ static void rtmpe8_sig(const uint8_t *in, uint8_t *out, int key_id) ...@@ -185,7 +185,7 @@ static void rtmpe8_sig(const uint8_t *in, uint8_t *out, int key_id)
{ {
struct AVXTEA ctx; struct AVXTEA ctx;
av_xtea_init(&ctx, rtmpe8_keys[key_id]); av_xtea_le_init(&ctx, rtmpe8_keys[key_id]);
av_xtea_le_crypt(&ctx, out, in, 1, NULL, 0); av_xtea_le_crypt(&ctx, out, in, 1, NULL, 0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment