]> git.saurik.com Git - apple/security.git/blame - OSX/include/security_cryptkit/feeHash.h
Security-57336.1.9.tar.gz
[apple/security.git] / OSX / include / security_cryptkit / feeHash.h
CommitLineData
d8f41ccd 1/* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
b1ab9ed8
A
2 *
3 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
4 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
d8f41ccd
A
5 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE, INC. AND THE
6 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE,
b1ab9ed8
A
7 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
8 * EXPOSE YOU TO LIABILITY.
9 ***************************************************************************
10 *
11 * FeeHash.h - generic, portable MD5 hash object
12 *
13 * Revision History
14 * ----------------
d8f41ccd 15 * 22 Aug 96 at NeXT
b1ab9ed8
A
16 * Created.
17 */
18
19#ifndef _CK_FEEHASH_H_
20#define _CK_FEEHASH_H_
21
22#if !defined(__MACH__)
23#include <ckconfig.h>
24#include <feeTypes.h>
25#else
26#include <security_cryptkit/ckconfig.h>
27#include <security_cryptkit/feeTypes.h>
28#endif
29
30#if CRYPTKIT_MD5_ENABLE
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/*
37 * Opaque hash object handle.
38 */
39typedef void *feeHash;
40
41/*
42 * Alloc and init an empty hash object.
43 */
44feeHash feeHashAlloc(void);
45
46/*
47 * reinitialize a hash object for reuse.
48 */
49void feeHashReinit(feeHash hash);
50
51/*
52 * Free a hash object.
53 */
54void feeHashFree(feeHash hash);
55
56/*
57 * Add some data to the hash object.
58 */
59void feeHashAddData(feeHash hash,
60 const unsigned char *data,
61 unsigned dataLen);
62
63/*
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.
67 */
68unsigned char *feeHashDigest(feeHash hash);
69
70/*
71 * Obtain the length of the message digest.
72 */
73unsigned feeHashDigestLen(void);
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif /* CRYPTKIT_MD5_ENABLE */
80
81#endif /*_CK_FEEHASH_H_*/