Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
md5.h
00001 /* md5.h 00002 * 00003 * Copyright (C) 2006-2013 wolfSSL Inc. 00004 * 00005 * This file is part of CyaSSL. 00006 * 00007 * CyaSSL is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * CyaSSL is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 00020 */ 00021 00022 #ifndef NO_MD5 00023 00024 #ifndef CTAO_CRYPT_MD5_H 00025 #define CTAO_CRYPT_MD5_H 00026 00027 #include <cyassl/ctaocrypt/types.h> 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 00034 /* in bytes */ 00035 enum { 00036 #ifdef STM32F2_HASH 00037 MD5_REG_SIZE = 4, /* STM32 register size, bytes */ 00038 #endif 00039 MD5 = 0, /* hash type unique */ 00040 MD5_BLOCK_SIZE = 64, 00041 MD5_DIGEST_SIZE = 16, 00042 MD5_PAD_SIZE = 56 00043 }; 00044 00045 #ifdef CYASSL_PIC32MZ_HASH 00046 #include "port/pic32/pic32mz-crypt.h" 00047 #endif 00048 00049 /* MD5 digest */ 00050 typedef struct Md5 { 00051 word32 buffLen; /* in bytes */ 00052 word32 loLen; /* length in bytes */ 00053 word32 hiLen; /* length in bytes */ 00054 word32 buffer[MD5_BLOCK_SIZE / sizeof(word32)]; 00055 #ifndef CYASSL_PIC32MZ_HASH 00056 word32 digest[MD5_DIGEST_SIZE / sizeof(word32)]; 00057 #else 00058 word32 digest[PIC32_HASH_SIZE / sizeof(word32)]; 00059 pic32mz_desc desc ; /* Crypt Engine descripter */ 00060 #endif 00061 } Md5; 00062 00063 CYASSL_API void InitMd5(Md5*); 00064 CYASSL_API void Md5Update(Md5*, const byte*, word32); 00065 CYASSL_API void Md5Final(Md5*, byte*); 00066 00067 #ifdef __cplusplus 00068 } /* extern "C" */ 00069 #endif 00070 00071 #endif /* CTAO_CRYPT_MD5_H */ 00072 #endif /* NO_MD5 */
Generated on Tue Jul 12 2022 20:12:51 by
