]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/feeRandom.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 * FeeRandom.h - generic, portable random number generator object
16 * Fixed previous check-in comment.
18 * Added tags around #endif comment.
23 #ifndef _CK_FEERANDOM_H_
24 #define _CK_FEERANDOM_H_
30 typedef void *feeRand
;
32 feeRand
feeRandAllocWithSeed(unsigned seed
);
33 feeRand
feeRandAlloc(void);
35 void feeRandFree(feeRand frand
);
37 unsigned feeRandNextNum(feeRand frand
);
39 void feeRandBytes(feeRand frand
,
40 unsigned char *bytes
, /* must be alloc'd by caller */
43 void feeRandAddEntropy(feeRand frand
, unsigned entropy
);
49 #endif /* _CK_FEERANDOM_H_ */