]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/feeHash.h
1 /* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
3 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
4 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
5 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE, INC. AND THE
6 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE,
7 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
8 * EXPOSE YOU TO LIABILITY.
9 ***************************************************************************
11 * FeeHash.h - generic, portable MD5 hash object
19 #ifndef _CK_FEEHASH_H_
20 #define _CK_FEEHASH_H_
22 #if !defined(__MACH__)
26 #include <security_cryptkit/ckconfig.h>
27 #include <security_cryptkit/feeTypes.h>
30 #if CRYPTKIT_MD5_ENABLE
37 * Opaque hash object handle.
39 typedef void *feeHash
;
42 * Alloc and init an empty hash object.
44 feeHash
feeHashAlloc(void);
47 * reinitialize a hash object for reuse.
49 void feeHashReinit(feeHash hash
);
54 void feeHashFree(feeHash hash
);
57 * Add some data to the hash object.
59 void feeHashAddData(feeHash hash
,
60 const unsigned char *data
,
64 * Obtain a pointer to completed message digest. This disables further calls
65 * to feeHashAddData(). This pointer is NOT malloc'd; the associated data
66 * persists only as long as this object does.
68 unsigned char *feeHashDigest(feeHash hash
);
71 * Obtain the length of the message digest.
73 unsigned feeHashDigestLen(void);
79 #endif /* CRYPTKIT_MD5_ENABLE */
81 #endif /*_CK_FEEHASH_H_*/