]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/ckSHA1.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 * ckSHA1.h - generic, portable SHA-1 hash object
15 * 05 Jan 1998 at Apple
22 #if !defined(__MACH__)
25 #include <security_cryptkit/feeTypes.h>
33 * Opaque sha1 object handle.
35 typedef void *sha1Obj
;
38 * Alloc and init an empty sha1 object.
40 sha1Obj
sha1Alloc(void);
43 * reinitialize an sha1 object for reuse.
45 void sha1Reinit(sha1Obj sha1
);
48 * Free an sha1 object.
50 void sha1Free(sha1Obj sha1
);
53 * Add some data to the sha1 object.
55 void sha1AddData(sha1Obj sha1
,
56 const unsigned char *data
,
60 * Obtain a pointer to completed message digest. This disables further calls
61 * to sha1AddData(). This pointer is NOT malloc'd; the associated data
62 * persists only as long as this object does.
64 unsigned char *sha1Digest(sha1Obj sha1
);
67 * Obtain the length of the message digest.
69 unsigned sha1DigestLen(void);
75 #endif /*_CK_SHA1_H_*/