xref: /xnu-10002.41.9/EXTERNAL_HEADERS/corecrypto/ccsha1.h (revision 699cd48037512bf4380799317ca44ca453c82f57)
1*699cd480SApple OSS Distributions /* Copyright (c) (2010,2011,2012,2014,2015,2016,2017,2018,2019) Apple Inc. All rights reserved.
2*699cd480SApple OSS Distributions  *
3*699cd480SApple OSS Distributions  * corecrypto is licensed under Apple Inc.’s Internal Use License Agreement (which
4*699cd480SApple OSS Distributions  * is contained in the License.txt file distributed with corecrypto) and only to
5*699cd480SApple OSS Distributions  * people who accept that license. IMPORTANT:  Any license rights granted to you by
6*699cd480SApple OSS Distributions  * Apple Inc. (if any) are limited to internal use within your organization only on
7*699cd480SApple OSS Distributions  * devices and computers you own or control, for the sole purpose of verifying the
8*699cd480SApple OSS Distributions  * security characteristics and correct functioning of the Apple Software.  You may
9*699cd480SApple OSS Distributions  * not, directly or indirectly, redistribute the Apple Software or any portions thereof.
10*699cd480SApple OSS Distributions  */
11*699cd480SApple OSS Distributions 
12*699cd480SApple OSS Distributions #ifndef _CORECRYPTO_CCSHA1_H_
13*699cd480SApple OSS Distributions #define _CORECRYPTO_CCSHA1_H_
14*699cd480SApple OSS Distributions 
15*699cd480SApple OSS Distributions #include <corecrypto/ccdigest.h>
16*699cd480SApple OSS Distributions #include <corecrypto/cc_config.h>
17*699cd480SApple OSS Distributions 
18*699cd480SApple OSS Distributions #define CCSHA1_BLOCK_SIZE   64
19*699cd480SApple OSS Distributions #define CCSHA1_OUTPUT_SIZE  20
20*699cd480SApple OSS Distributions #define CCSHA1_STATE_SIZE   20
21*699cd480SApple OSS Distributions 
22*699cd480SApple OSS Distributions /* sha1 selector */
23*699cd480SApple OSS Distributions const struct ccdigest_info *ccsha1_di(void);
24*699cd480SApple OSS Distributions 
25*699cd480SApple OSS Distributions /* Implementations */
26*699cd480SApple OSS Distributions extern const struct ccdigest_info ccsha1_ltc_di;
27*699cd480SApple OSS Distributions extern const struct ccdigest_info ccsha1_eay_di;
28*699cd480SApple OSS Distributions 
29*699cd480SApple OSS Distributions #if  CCSHA1_VNG_INTEL
30*699cd480SApple OSS Distributions extern const struct ccdigest_info ccsha1_vng_intel_SupplementalSSE3_di;
31*699cd480SApple OSS Distributions #endif
32*699cd480SApple OSS Distributions 
33*699cd480SApple OSS Distributions #if  CCSHA1_VNG_ARM
34*699cd480SApple OSS Distributions extern const struct ccdigest_info ccsha1_vng_arm_di;
35*699cd480SApple OSS Distributions #endif
36*699cd480SApple OSS Distributions 
37*699cd480SApple OSS Distributions #define ccoid_sha1 ((unsigned char *)"\x06\x05\x2b\x0e\x03\x02\x1a")
38*699cd480SApple OSS Distributions #define ccoid_sha1_len 7
39*699cd480SApple OSS Distributions 
40*699cd480SApple OSS Distributions #endif /* _CORECRYPTO_CCSHA1_H_ */
41