| 1 | /* |
|---|---|
| 2 | * ccdigest_priv.h |
| 3 | * corecrypto |
| 4 | * |
| 5 | * Created on 12/07/2010 |
| 6 | * |
| 7 | * Copyright (c) 2010,2011,2012,2015 Apple Inc. All rights reserved. |
| 8 | * |
| 9 | */ |
| 10 | |
| 11 | #ifndef _CORECRYPTO_CCDIGEST_PRIV_H_ |
| 12 | #define _CORECRYPTO_CCDIGEST_PRIV_H_ |
| 13 | |
| 14 | #include <corecrypto/ccdigest.h> |
| 15 | #include <corecrypto/ccasn1.h> |
| 16 | |
| 17 | CC_INLINE CC_NONNULL((1)) |
| 18 | bool ccdigest_oid_equal(const struct ccdigest_info *di, ccoid_t oid) { |
| 19 | if(di->oid == NULL && CCOID(oid) == NULL) return true; |
| 20 | if(di->oid == NULL || CCOID(oid) == NULL) return false; |
| 21 | return ccoid_equal(di->oid, oid); |
| 22 | } |
| 23 | |
| 24 | typedef const struct ccdigest_info *(ccdigest_lookup)(ccoid_t oid); |
| 25 | |
| 26 | #include <stdarg.h> |
| 27 | const struct ccdigest_info *ccdigest_oid_lookup(ccoid_t oid, ...); |
| 28 | |
| 29 | #endif /* _CORECRYPTO_CCDIGEST_PRIV_H_ */ |
| 30 |