]> git.saurik.com Git - apple/security.git/blob - Security/libsecurity_cryptkit/lib/NSRandomNumberGenerator.h
Security-57031.40.6.tar.gz
[apple/security.git] / Security / libsecurity_cryptkit / lib / NSRandomNumberGenerator.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 * NSRandomNumberGenerator.h
12 *
13 * Revision History
14 * ----------------
15 * 28 Mar 97 at Apple
16 * Simplified.
17 * ?? 96 Blaine Garst at NeXT
18 * Created.
19 */
20
21 #import <Foundation/NSData.h>
22
23 @interface NSRandomNumberGenerator : NSObject
24 {
25 void *_priv;
26 }
27
28 - initWithSeed:(unsigned)seed; // designated initializer
29 - init; // we'll come up with the best seed
30 // we can
31
32 - (unsigned)nextNumber;
33 - (unsigned)nextNumberInRange:(NSRange)range;
34 - (NSData *)randomDataWithLength:(unsigned)l;
35
36 @end