]>
Commit | Line | Data |
---|---|---|
316670eb A |
1 | /* |
2 | * ccsha1.h | |
3 | * corecrypto | |
4 | * | |
3e170ce0 A |
5 | * Created on 12/01/2010 |
6 | * | |
7 | * Copyright (c) 2010,2011,2012,2014,2015 Apple Inc. All rights reserved. | |
316670eb A |
8 | * |
9 | */ | |
10 | ||
11 | #ifndef _CORECRYPTO_CCSHA1_H_ | |
12 | #define _CORECRYPTO_CCSHA1_H_ | |
13 | ||
14 | #include <corecrypto/ccdigest.h> | |
15 | #include <corecrypto/cc_config.h> | |
16 | ||
17 | #define CCSHA1_BLOCK_SIZE 64 | |
18 | #define CCSHA1_OUTPUT_SIZE 20 | |
19 | #define CCSHA1_STATE_SIZE 20 | |
20 | ||
21 | /* sha1 selector */ | |
22 | const struct ccdigest_info *ccsha1_di(void); | |
23 | ||
24 | extern const uint32_t ccsha1_initial_state[5]; | |
25 | ||
26 | /* shared between several implementations */ | |
27 | void ccsha1_final(const struct ccdigest_info *di, ccdigest_ctx_t, | |
28 | unsigned char *digest); | |
29 | ||
30 | ||
31 | /* Implementations */ | |
32 | extern const struct ccdigest_info ccsha1_ltc_di; | |
33 | extern const struct ccdigest_info ccsha1_eay_di; | |
34 | ||
39037602 | 35 | #if CCSHA1_VNG_INTEL |
fe8ab488 | 36 | //extern const struct ccdigest_info ccsha1_vng_intel_di; |
39037602 A |
37 | #if defined(__x86_64__) |
38 | extern const struct ccdigest_info ccsha1_vng_intel_AVX2_di; | |
39 | extern const struct ccdigest_info ccsha1_vng_intel_AVX1_di; | |
40 | #endif | |
fe8ab488 | 41 | extern const struct ccdigest_info ccsha1_vng_intel_SupplementalSSE3_di; |
316670eb A |
42 | #endif |
43 | ||
39037602 | 44 | #if CCSHA1_VNG_ARMV7NEON |
316670eb A |
45 | extern const struct ccdigest_info ccsha1_vng_armv7neon_di; |
46 | #endif | |
47 | ||
48 | /* TODO: Placeholders */ | |
49 | #define ccoid_sha1 ((unsigned char *)"\x06\x05\x2b\x0e\x03\x02\x1a") | |
50 | #define ccoid_sha1_len 7 | |
51 | ||
52 | #endif /* _CORECRYPTO_CCSHA1_H_ */ |