3 * Copyright (C) 2006-2015 wolfSSL Inc.
5 * This file is part of wolfSSL. (formerly known as CyaSSL)
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.
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.
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-1301, USA
26 #include <wolfssl/wolfcrypt/settings.h>
28 #if !defined(WOLFSSL_TI_HASH)
30 #include <wolfssl/wolfcrypt/hash.h>
33 void wc_Md5GetHash(Md5* md5, byte* hash)
36 wc_Md5Final(md5, hash) ;
40 WOLFSSL_API void wc_Md5RestorePos(Md5* m1, Md5* m2) {
46 int wc_ShaGetHash(Sha* sha, byte* hash)
50 ret = wc_ShaFinal(sha, hash) ;
55 WOLFSSL_API void wc_ShaRestorePos(Sha* s1, Sha* s2) {
60 #if !defined(NO_SHA256)
61 int wc_Sha256GetHash(Sha256* sha256, byte* hash)
64 Sha256 save = *sha256 ;
65 ret = wc_Sha256Final(sha256, hash) ;
70 WOLFSSL_API void wc_Sha256RestorePos(Sha256* s1, Sha256* s2) {