X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Fdes.h;h=cda98122d31f32f0f1d76077ddf301265221a717;hb=8f5587c3d0bc4b5f075e4282215bda91a21fc12e;hp=c02f244350392e1856b22b3bcf91f69abe604a55;hpb=1a534c7f1e2cf672bbdd800e229cfe34eb089cc5;p=ffmpeg diff --git a/libavutil/des.h b/libavutil/des.h index c02f2443503..cda98122d31 100644 --- a/libavutil/des.h +++ b/libavutil/des.h @@ -2,20 +2,20 @@ * DES encryption/decryption * Copyright (c) 2007 Reimar Doeffinger * - * This file is part of FFmpeg. + * This file is part of Libav. * - * FFmpeg is free software; you can redistribute it and/or + * Libav is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * FFmpeg is distributed in the hope that it will be useful, + * Libav is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software + * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -30,23 +30,32 @@ struct AVDES { }; /** - * \brief Initializes an AVDES context. + * @brief Initializes an AVDES context. * - * \param key_bits must be 64 - * \param decrypt 0 for encryption, 1 for decryption + * @param key_bits must be 64 or 192 + * @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); /** - * \brief Encrypts / decrypts using the DES algorithm. + * @brief Encrypts / decrypts 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 - * \param iv initialization vector for CBC mode, if NULL then ECB will be used, + * @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 + * @param iv initialization vector for CBC mode, if NULL then ECB will be used, * must be 8-byte aligned - * \param decrypt 0 for encryption, 1 for decryption + * @param decrypt 0 for encryption, 1 for decryption */ 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 */