]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/des.h
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavutil / des.h
index dd670869b2b5c0653e8e7ef66866ee180f9ee783..2feb0468db7fcca97b6c60ce02682d642dd28cc0 100644 (file)
@@ -33,7 +33,7 @@ struct AVDES {
  * @brief Initializes an AVDES context.
  *
  * @param key_bits must be 64 or 192
- * @param decrypt 0 for encryption, 1 for decryption
+ * @param decrypt 0 for encryption/CBC-MAC, 1 for decryption
  */
 int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt);
 
@@ -49,4 +49,13 @@ int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt);
  */
 void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
 
+/**
+ * @brief Calculates CBC-MAC using the DES algorithm.
+ *
+ * @param count number of 8 byte blocks
+ * @param dst destination array, can be equal to src, must be 8-byte aligned
+ * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL
+ */
+void av_des_mac(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count);
+
 #endif /* AVUTIL_DES_H */