]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/feeRandom.h
Security-57337.20.44.tar.gz
[apple/security.git] / OSX / libsecurity_cryptkit / lib / feeRandom.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 * FeeRandom.h - generic, portable random number generator object
12 *
13 * Revision History
14 * ----------------
15 * 8/25/98 ap
16 * Fixed previous check-in comment.
17 * 8/24/98 ap
18 * Added tags around #endif comment.
19 * 23 Aug 96 at NeXT
20 * Created.
21 */
22
23 #ifndef _CK_FEERANDOM_H_
24 #define _CK_FEERANDOM_H_
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 typedef void *feeRand;
31
32 feeRand feeRandAllocWithSeed(unsigned seed);
33 feeRand feeRandAlloc(void);
34
35 void feeRandFree(feeRand frand);
36
37 unsigned feeRandNextNum(feeRand frand);
38
39 void feeRandBytes(feeRand frand,
40 unsigned char *bytes, /* must be alloc'd by caller */
41 unsigned numBytes);
42
43 void feeRandAddEntropy(feeRand frand, unsigned entropy);
44
45 #ifdef __cplusplus
46 }
47 #endif
48
49 #endif /* _CK_FEERANDOM_H_ */