source: UsbWattMeter/trunk/wolfssl-3.7.0/wolfssl/wolfcrypt/hash.h

Last change on this file was 167, checked in by coas-nagasima, 8 years ago

MIMEにSJISを設定

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-chdr; charset=SHIFT_JIS
File size: 2.5 KB
Line 
1/* hash.h
2 *
3 * Copyright (C) 2006-2015 wolfSSL Inc.
4 *
5 * This file is part of wolfSSL. (formerly known as CyaSSL)
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-1301, USA
20 */
21
22#ifndef WOLF_CRYPT_HASH_H
23#define WOLF_CRYPT_HASH_H
24
25#include <wolfssl/wolfcrypt/types.h>
26
27#ifdef __cplusplus
28 extern "C" {
29#endif
30
31#ifndef NO_MD5
32#include <wolfssl/wolfcrypt/md5.h>
33WOLFSSL_API void wc_Md5GetHash(Md5*, byte*);
34WOLFSSL_API void wc_Md5RestorePos(Md5*, Md5*) ;
35#if defined(WOLFSSL_TI_HASH)
36 WOLFSSL_API void wc_Md5Free(Md5*);
37#else
38 #define wc_Md5Free(d)
39#endif
40#endif
41
42#ifndef NO_SHA
43#include <wolfssl/wolfcrypt/sha.h>
44WOLFSSL_API int wc_ShaGetHash(Sha*, byte*);
45WOLFSSL_API void wc_ShaRestorePos(Sha*, Sha*) ;
46WOLFSSL_API int wc_ShaHash(const byte*, word32, byte*);
47#if defined(WOLFSSL_TI_HASH)
48 WOLFSSL_API void wc_ShaFree(Sha*);
49#else
50 #define wc_ShaFree(d)
51#endif
52#endif
53
54#ifndef NO_SHA256
55#include <wolfssl/wolfcrypt/sha256.h>
56WOLFSSL_API int wc_Sha256GetHash(Sha256*, byte*);
57WOLFSSL_API void wc_Sha256RestorePos(Sha256*, Sha256*) ;
58WOLFSSL_API int wc_Sha256Hash(const byte*, word32, byte*);
59#if defined(WOLFSSL_TI_HASH)
60 WOLFSSL_API void wc_Sha256Free(Sha256*);
61#else
62 #define wc_Sha256Free(d)
63#endif
64#endif
65
66#ifdef WOLFSSL_SHA512
67#include <wolfssl/wolfcrypt/sha512.h>
68WOLFSSL_API int wc_Sha512Hash(const byte*, word32, byte*);
69#if defined(WOLFSSL_TI_HASH)
70 WOLFSSL_API void wc_Sha512Free(Sha512*);
71#else
72 #define wc_Sha512Free(d)
73#endif
74 #if defined(WOLFSSL_SHA384)
75 WOLFSSL_API int wc_Sha384Hash(const byte*, word32, byte*);
76 #if defined(WOLFSSL_TI_HASH)
77 WOLFSSL_API void wc_Sha384Free(Sha384*);
78 #else
79 #define wc_Sha384Free(d)
80 #endif
81 #endif /* defined(WOLFSSL_SHA384) */
82#endif /* WOLFSSL_SHA512 */
83
84
85#ifdef __cplusplus
86 } /* extern "C" */
87#endif
88
89#endif /* WOLF_CRYPT_HASH_H */
Note: See TracBrowser for help on using the repository browser.