yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame] | 1 | /* md4.h |
| 2 | * |
| 3 | * Copyright (C) 2006-2021 wolfSSL Inc. |
| 4 | * |
| 5 | * This file is part of wolfSSL. |
| 6 | * |
| 7 | * wolfSSL is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * wolfSSL is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA |
| 20 | */ |
| 21 | |
| 22 | |
| 23 | #ifndef WOLFSSL_MD4_H_ |
| 24 | #define WOLFSSL_MD4_H_ |
| 25 | |
| 26 | #include <wolfssl/wolfcrypt/settings.h> |
| 27 | |
| 28 | #ifndef NO_MD4 |
| 29 | |
| 30 | #ifdef WOLFSSL_PREFIX |
| 31 | #include "prefix_md4.h" |
| 32 | #endif |
| 33 | |
| 34 | #ifdef __cplusplus |
| 35 | extern "C" { |
| 36 | #endif |
| 37 | |
| 38 | |
| 39 | typedef struct WOLFSSL_MD4_CTX { |
| 40 | int buffer[32]; /* big enough to hold, check size in Init */ |
| 41 | } WOLFSSL_MD4_CTX; |
| 42 | |
| 43 | |
| 44 | WOLFSSL_API void wolfSSL_MD4_Init(WOLFSSL_MD4_CTX*); |
| 45 | WOLFSSL_API void wolfSSL_MD4_Update(WOLFSSL_MD4_CTX*, const void*, unsigned long); |
| 46 | WOLFSSL_API void wolfSSL_MD4_Final(unsigned char*, WOLFSSL_MD4_CTX*); |
| 47 | |
| 48 | |
| 49 | typedef WOLFSSL_MD4_CTX MD4_CTX; |
| 50 | |
| 51 | #define MD4_Init wolfSSL_MD4_Init |
| 52 | #define MD4_Update wolfSSL_MD4_Update |
| 53 | #define MD4_Final wolfSSL_MD4_Final |
| 54 | |
| 55 | #ifdef __cplusplus |
| 56 | } /* extern "C" */ |
| 57 | #endif |
| 58 | |
| 59 | #endif /* NO_MD4 */ |
| 60 | |
| 61 | #endif /* WOLFSSL_MD4_H_ */ |
| 62 | |