]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/xtea.h
ffmpeg: When streamcopying, only add the input seek position when copying timestamps.
[ffmpeg] / libavutil / xtea.h
index bcf786cce3027168b3809da4f069132eab8c3bca..735427c109a15229f7750073b4591763d6ab60ca 100644 (file)
@@ -45,12 +45,23 @@ AVXTEA *av_xtea_alloc(void);
  * Initialize an AVXTEA context.
  *
  * @param ctx an AVXTEA context
- * @param key a key of 16 bytes used for encryption/decryption
+ * @param key a key of 16 bytes used for encryption/decryption,
+ *            interpreted as big endian 32 bit numbers
  */
 void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);
 
 /**
- * Encrypt or decrypt a buffer using a previously initialized context.
+ * 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.
  *
  * @param ctx an AVXTEA context
  * @param dst destination array, can be equal to src
@@ -62,6 +73,20 @@ void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);
 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);
+
 /**
  * @}
  */