diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2015-11-22 14:29:09 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2015-11-22 14:29:09 +0000 |
commit | e12f4036786136734b917d5bad641f2f89c3f9d2 (patch) | |
tree | f7d69dea07ae423d3c4b01bfbb6400cb7ce7bdbb /libavutil/xtea.h | |
parent | ced39dc5ed3ad40e7f970c95019721d58742088a (diff) | |
parent | 588b6215b4c74945994eb9636b0699028c069ed2 (diff) |
Merge commit '588b6215b4c74945994eb9636b0699028c069ed2'
* commit '588b6215b4c74945994eb9636b0699028c069ed2':
rtmpcrypt: Do the xtea decryption in little endian mode
xtea: Add functions for little endian mode
Conflicts:
libavutil/xtea.c
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavutil/xtea.h')
-rw-r--r-- | libavutil/xtea.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libavutil/xtea.h b/libavutil/xtea.h index 06f5a2f470..735427c109 100644 --- a/libavutil/xtea.h +++ b/libavutil/xtea.h @@ -51,6 +51,15 @@ AVXTEA *av_xtea_alloc(void); void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]); /** + * Initialize an AVXTEA context. + * + * @param ctx an AVXTEA context + * @param key a key of 16 bytes used for encryption/decryption, + * interpreted as little endian 32 bit numbers + */ +void av_xtea_le_init(struct AVXTEA *ctx, const uint8_t key[16]); + +/** * Encrypt or decrypt a buffer using a previously initialized context, * in big endian format. * @@ -65,6 +74,20 @@ void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); /** + * Encrypt or decrypt a buffer using a previously initialized context, + * in little endian format. + * + * @param ctx an AVXTEA context + * @param dst destination array, can be equal to src + * @param src source array, can be equal to dst + * @param count number of 8 byte blocks + * @param iv initialization vector for CBC mode, if NULL then ECB will be used + * @param decrypt 0 for encryption, 1 for decryption + */ +void av_xtea_le_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src, + int count, uint8_t *iv, int decrypt); + +/** * @} */ |