X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Fdes.h;h=2feb0468db7fcca97b6c60ce02682d642dd28cc0;hb=31ec69477193965111c95fe3bb321c109c9f91f2;hp=dd670869b2b5c0653e8e7ef66866ee180f9ee783;hpb=ada49f936eaafe12365c7b962355d6dcfbfc4029;p=ffmpeg diff --git a/libavutil/des.h b/libavutil/des.h index dd670869b2b..2feb0468db7 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 */