diff options
author | Martin Storsjö <martin@martin.st> | 2015-11-11 22:09:41 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-11-13 21:53:54 +0200 |
commit | 92d107a17127c29036b71e53315a2c702960819a (patch) | |
tree | acba02fa2d97eafc012a26ad7700fc62c38ed4e4 /libavutil/xtea.h | |
parent | 1fc94724f1fd52944bb5ae571475c621da4b77a0 (diff) | |
download | ffmpeg-92d107a17127c29036b71e53315a2c702960819a.tar.gz |
xtea: Add functions for little endian mode
Signed-off-by: Martin Storsjö <martin@martin.st>
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 ad76955db4..78b1f378db 100644 --- a/libavutil/xtea.h +++ b/libavutil/xtea.h @@ -55,6 +55,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. * @@ -69,6 +78,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); + +/** * @} */ |