diff options
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); + +/** * @} */ |