Commit 588b6215 authored by Martin Storsjö's avatar Martin Storsjö

rtmpcrypt: Do the xtea decryption in little endian mode

The XTEA algorithm operates on 32 bit numbers, not on byte sequences.
The XTEA implementation in libavutil is written assuming big endian
numbers, while the rtmpe signature encryption assumes little endian.

This fixes rtmpe communication with rtmpe servers that use signature
type 8 (XTEA), e.g. crunchyroll.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 92d107a1
......@@ -186,7 +186,7 @@ static void rtmpe8_sig(const uint8_t *in, uint8_t *out, int key_id)
struct AVXTEA ctx;
av_xtea_init(&ctx, rtmpe8_keys[key_id]);
av_xtea_crypt(&ctx, out, in, 1, NULL, 0);
av_xtea_le_crypt(&ctx, out, in, 1, NULL, 0);
}
static void rtmpe9_sig(const uint8_t *in, uint8_t *out, int key_id)
......
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