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
35extern const struct ccdigest_info ccsha1_vng_intel_SSE3_di;
36extern const struct ccdigest_info ccsha1_vng_intel_NOSSE3_di;
37#endif
38
39#if CCSHA1_VNG_ARMV7NEON
40extern const struct ccdigest_info ccsha1_vng_armv7neon_di;
41#endif
42
43/* TODO: Placeholders */
44#define ccoid_sha1 ((unsigned char *)"\x06\x05\x2b\x0e\x03\x02\x1a")
45#define ccoid_sha1_len 7
46
47#endif /* _CORECRYPTO_CCSHA1_H_ */
48