mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 10:08:33 -04:00
Update CyaSSL to latest version.
This commit is contained in:
parent
5fcd270398
commit
3d007d0b4b
445 changed files with 162375 additions and 26182 deletions
|
@ -1,6 +1,6 @@
|
|||
/* md5.h
|
||||
*
|
||||
* Copyright (C) 2006-2012 Sawtooth Consulting Ltd.
|
||||
* Copyright (C) 2006-2014 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of CyaSSL.
|
||||
*
|
||||
|
@ -16,9 +16,10 @@
|
|||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef NO_MD5
|
||||
|
||||
#ifndef CTAO_CRYPT_MD5_H
|
||||
#define CTAO_CRYPT_MD5_H
|
||||
|
@ -32,26 +33,37 @@
|
|||
|
||||
/* in bytes */
|
||||
enum {
|
||||
#ifdef STM32F2_HASH
|
||||
MD5_REG_SIZE = 4, /* STM32 register size, bytes */
|
||||
#endif
|
||||
MD5 = 0, /* hash type unique */
|
||||
MD5_BLOCK_SIZE = 64,
|
||||
MD5_DIGEST_SIZE = 16,
|
||||
MD5_PAD_SIZE = 56
|
||||
};
|
||||
|
||||
#ifdef CYASSL_PIC32MZ_HASH
|
||||
#include "port/pic32/pic32mz-crypt.h"
|
||||
#endif
|
||||
|
||||
/* MD5 digest */
|
||||
typedef struct Md5 {
|
||||
word32 buffLen; /* in bytes */
|
||||
word32 loLen; /* length in bytes */
|
||||
word32 hiLen; /* length in bytes */
|
||||
word32 digest[MD5_DIGEST_SIZE / sizeof(word32)];
|
||||
word32 buffer[MD5_BLOCK_SIZE / sizeof(word32)];
|
||||
#ifndef CYASSL_PIC32MZ_HASH
|
||||
word32 digest[MD5_DIGEST_SIZE / sizeof(word32)];
|
||||
#else
|
||||
word32 digest[PIC32_HASH_SIZE / sizeof(word32)];
|
||||
pic32mz_desc desc ; /* Crypt Engine descripter */
|
||||
#endif
|
||||
} Md5;
|
||||
|
||||
|
||||
CYASSL_API void InitMd5(Md5*);
|
||||
CYASSL_API void Md5Update(Md5*, const byte*, word32);
|
||||
CYASSL_API void Md5Final(Md5*, byte*);
|
||||
CYASSL_API int Md5Hash(const byte*, word32, byte*);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -59,4 +71,4 @@ CYASSL_API void Md5Final(Md5*, byte*);
|
|||
#endif
|
||||
|
||||
#endif /* CTAO_CRYPT_MD5_H */
|
||||
|
||||
#endif /* NO_MD5 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue