summaryrefslogtreecommitdiff
path: root/libavutil/des.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/des.h')
-rw-r--r--libavutil/des.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavutil/des.h b/libavutil/des.h
index dd670869b2..2feb0468db 100644
--- a/libavutil/des.h
+++ b/libavutil/des.h
@@ -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 */