]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/ckutilities.h
Security-59306.11.20.tar.gz
[apple/security.git] / OSX / libsecurity_cryptkit / lib / ckutilities.h
1 /* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
2 *
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 ***************************************************************************
10 *
11 * ckutilities.h - general private C routine declarations
12 *
13 * Revision History
14 * ----------------
15 * 10/06/98 ap
16 * Changed to compile with C++.
17 * 2 Aug 96 at NeXT
18 * Broke out from Blaine Garst's original NSCryptors.m
19 */
20
21 #ifndef _CK_UTILITIES_H_
22 #define _CK_UTILITIES_H_
23
24 #include "giantIntegers.h"
25 #include "elliptic.h"
26 #include "feeTypes.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 unsigned char *mem_from_giant(giant x, unsigned *memLen);
33 giant giant_with_data(const unsigned char *d, int len);
34
35 void serializeGiant(giant g,
36 unsigned char *cp,
37 unsigned numBytes);
38
39 void deserializeGiant(const unsigned char *cp,
40 giant g,
41 unsigned numBytes);
42
43 #ifdef __cplusplus
44 }
45 #endif
46
47 #endif /* _CK_UTILITIES_H_ */