]> git.saurik.com Git - apple/xnu.git/blame - EXTERNAL_HEADERS/corecrypto/ccsha1.h
xnu-2782.40.9.tar.gz
[apple/xnu.git] / EXTERNAL_HEADERS / corecrypto / ccsha1.h
CommitLineData
316670eb
A
1/*
2 * ccsha1.h
3 * corecrypto
4 *
5 * Created by Michael Brouwer on 12/1/10.
6 * Copyright 2010,2011 Apple Inc. All rights reserved.
7 *
8 */
9
10#ifndef _CORECRYPTO_CCSHA1_H_
11#define _CORECRYPTO_CCSHA1_H_
12
13#include <corecrypto/ccdigest.h>
14#include <corecrypto/cc_config.h>
15
16#define CCSHA1_BLOCK_SIZE 64
17#define CCSHA1_OUTPUT_SIZE 20
18#define CCSHA1_STATE_SIZE 20
19
20/* sha1 selector */
21const struct ccdigest_info *ccsha1_di(void);
22
23extern const uint32_t ccsha1_initial_state[5];
24
25/* shared between several implementations */
26void ccsha1_final(const struct ccdigest_info *di, ccdigest_ctx_t,
27 unsigned char *digest);
28
29
30/* Implementations */
31extern const struct ccdigest_info ccsha1_ltc_di;
32extern const struct ccdigest_info ccsha1_eay_di;
33
34#if CCSHA1_VNG_INTEL
fe8ab488
A
35//extern const struct ccdigest_info ccsha1_vng_intel_di;
36extern const struct ccdigest_info ccsha1_vng_intel_SupplementalSSE3_di;
37extern const struct ccdigest_info ccsha1_vng_intel_NOSupplementalSSE3_di;
316670eb
A
38#endif
39
40#if CCSHA1_VNG_ARMV7NEON
41extern const struct ccdigest_info ccsha1_vng_armv7neon_di;
42#endif
43
44/* TODO: Placeholders */
45#define ccoid_sha1 ((unsigned char *)"\x06\x05\x2b\x0e\x03\x02\x1a")
46#define ccoid_sha1_len 7
47
48#endif /* _CORECRYPTO_CCSHA1_H_ */