xref: /OK3568_Linux_fs/external/security/librkcrypto/test/include/c_mode/hmac.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */
2*4882a593Smuzhiyun /* ====================================================================
3*4882a593Smuzhiyun  * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Redistribution and use in source and binary forms, with or without
6*4882a593Smuzhiyun  * modification, are permitted provided that the following conditions
7*4882a593Smuzhiyun  * are met:
8*4882a593Smuzhiyun  *
9*4882a593Smuzhiyun  * 1. Redistributions of source code must retain the above copyright
10*4882a593Smuzhiyun  *    notice, this list of conditions and the following disclaimer.
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * 2. Redistributions in binary form must reproduce the above copyright
13*4882a593Smuzhiyun  *    notice, this list of conditions and the following disclaimer in
14*4882a593Smuzhiyun  *    the documentation and/or other materials provided with the
15*4882a593Smuzhiyun  *    distribution.
16*4882a593Smuzhiyun  *
17*4882a593Smuzhiyun  * 3. All advertising materials mentioning features or use of this
18*4882a593Smuzhiyun  *    software must display the following acknowledgment:
19*4882a593Smuzhiyun  *    "This product includes software developed by the OpenSSL Project
20*4882a593Smuzhiyun  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21*4882a593Smuzhiyun  *
22*4882a593Smuzhiyun  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23*4882a593Smuzhiyun  *    endorse or promote products derived from this software without
24*4882a593Smuzhiyun  *    prior written permission. For written permission, please contact
25*4882a593Smuzhiyun  *    openssl-core@openssl.org.
26*4882a593Smuzhiyun  *
27*4882a593Smuzhiyun  * 5. Products derived from this software may not be called "OpenSSL"
28*4882a593Smuzhiyun  *    nor may "OpenSSL" appear in their names without prior written
29*4882a593Smuzhiyun  *    permission of the OpenSSL Project.
30*4882a593Smuzhiyun  *
31*4882a593Smuzhiyun  * 6. Redistributions of any form whatsoever must retain the following
32*4882a593Smuzhiyun  *    acknowledgment:
33*4882a593Smuzhiyun  *    "This product includes software developed by the OpenSSL Project
34*4882a593Smuzhiyun  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
35*4882a593Smuzhiyun  *
36*4882a593Smuzhiyun  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
37*4882a593Smuzhiyun  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38*4882a593Smuzhiyun  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39*4882a593Smuzhiyun  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
40*4882a593Smuzhiyun  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41*4882a593Smuzhiyun  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42*4882a593Smuzhiyun  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43*4882a593Smuzhiyun  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44*4882a593Smuzhiyun  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
45*4882a593Smuzhiyun  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46*4882a593Smuzhiyun  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
47*4882a593Smuzhiyun  * OF THE POSSIBILITY OF SUCH DAMAGE.
48*4882a593Smuzhiyun  * ====================================================================
49*4882a593Smuzhiyun  *
50*4882a593Smuzhiyun  */
51*4882a593Smuzhiyun 
52*4882a593Smuzhiyun #ifndef __HMAC_H__
53*4882a593Smuzhiyun #define __HMAC_H__
54*4882a593Smuzhiyun 
55*4882a593Smuzhiyun #ifdef  __cplusplus
56*4882a593Smuzhiyun extern "C" {
57*4882a593Smuzhiyun #endif
58*4882a593Smuzhiyun 
59*4882a593Smuzhiyun int rk_hmac_md5(const unsigned char *key, unsigned int key_len, const unsigned char *in,
60*4882a593Smuzhiyun 		unsigned int in_len, unsigned char *out, unsigned int *out_len);
61*4882a593Smuzhiyun 
62*4882a593Smuzhiyun int rk_hmac_sha1(const unsigned char *key, unsigned int key_len, const unsigned char *in,
63*4882a593Smuzhiyun 		 unsigned int in_len, unsigned char *out, unsigned int *out_len);
64*4882a593Smuzhiyun 
65*4882a593Smuzhiyun int rk_hmac_sha256(const unsigned char *key, unsigned int key_len, const unsigned char *in,
66*4882a593Smuzhiyun 		   unsigned int in_len, unsigned char *out, unsigned int *out_len);
67*4882a593Smuzhiyun 
68*4882a593Smuzhiyun int rk_hmac_sha512(const unsigned char *key, unsigned int key_len, const unsigned char *in,
69*4882a593Smuzhiyun 		   unsigned int in_len, unsigned char *out, unsigned int *out_len);
70*4882a593Smuzhiyun 
71*4882a593Smuzhiyun int rk_hmac_sm3(const unsigned char *key, unsigned int key_len, const unsigned char *in,
72*4882a593Smuzhiyun 		unsigned int in_len, unsigned char *out, unsigned int *out_len);
73*4882a593Smuzhiyun 
74*4882a593Smuzhiyun #ifdef  __cplusplus
75*4882a593Smuzhiyun }
76*4882a593Smuzhiyun #endif
77*4882a593Smuzhiyun 
78*4882a593Smuzhiyun #endif /* !__AES_XTS_H__ */
79