]> git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/corecrypto/ccrng.h
xnu-2050.24.15.tar.gz
[apple/xnu.git] / EXTERNAL_HEADERS / corecrypto / ccrng.h
1 /*
2 * ccrng.h
3 * corecrypto
4 *
5 * Created by Fabrice Gautier on 12/13/10.
6 * Copyright 2010 Apple, Inc. All rights reserved.
7 *
8 */
9
10
11 #ifndef _CORECRYPTO_CCRNG_H_
12 #define _CORECRYPTO_CCRNG_H_
13
14 #include <stdint.h>
15
16 #define CCRNG_STATE_COMMON \
17 int (*generate)(struct ccrng_state *rng, unsigned long outlen, void *out);
18
19 /* default state structure - do not instantiate, instead use the specific one you need */
20 struct ccrng_state {
21 CCRNG_STATE_COMMON
22 };
23
24 #define ccrng_generate(ctx, outlen, out) ((ctx)->generate((ctx), (outlen), (out)))
25
26 #endif /* _CORECRYPTO_CCRNG_H_ */