]>
Commit | Line | Data |
---|---|---|
fe8ab488 A |
1 | /* |
2 | * ccdigest_priv.h | |
3 | * corecrypto | |
4 | * | |
3e170ce0 A |
5 | * Created on 12/07/2010 |
6 | * | |
7 | * Copyright (c) 2010,2011,2012,2015 Apple Inc. All rights reserved. | |
fe8ab488 A |
8 | * |
9 | */ | |
10 | ||
11 | #ifndef _CORECRYPTO_CCDIGEST_PRIV_H_ | |
12 | #define _CORECRYPTO_CCDIGEST_PRIV_H_ | |
13 | ||
14 | #include <corecrypto/ccdigest.h> | |
39037602 | 15 | #include <corecrypto/ccasn1.h> |
fe8ab488 A |
16 | |
17 | void ccdigest_final_common(const struct ccdigest_info *di, | |
18 | ccdigest_ctx_t ctx, void *digest); | |
19 | void ccdigest_final_64be(const struct ccdigest_info *di, ccdigest_ctx_t, | |
20 | unsigned char *digest); | |
21 | void ccdigest_final_64le(const struct ccdigest_info *di, ccdigest_ctx_t, | |
22 | unsigned char *digest); | |
23 | ||
39037602 A |
24 | CC_INLINE CC_NONNULL_TU((1)) |
25 | bool ccdigest_oid_equal(const struct ccdigest_info *di, ccoid_t oid) { | |
26 | if(di->oid == NULL && CCOID(oid) == NULL) return true; | |
27 | if(di->oid == NULL || CCOID(oid) == NULL) return false; | |
28 | return ccoid_equal(di->oid, oid); | |
29 | } | |
30 | ||
31 | typedef const struct ccdigest_info *(ccdigest_lookup)(ccoid_t oid); | |
32 | ||
33 | #include <stdarg.h> | |
34 | const struct ccdigest_info *ccdigest_oid_lookup(ccoid_t oid, ...); | |
35 | ||
fe8ab488 | 36 | #endif /* _CORECRYPTO_CCDIGEST_PRIV_H_ */ |