]>
git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/corecrypto/ccrng.h
5 * Created by Fabrice Gautier on 12/13/10.
6 * Copyright 2010 Apple, Inc. All rights reserved.
10 #ifndef _CORECRYPTO_CCRNG_H_
11 #define _CORECRYPTO_CCRNG_H_
15 #define CC_ERR_DEVICE -100
16 #define CC_ERR_INTERUPTS -101
17 #define CC_ERR_CRYPTO_CONFIG -102
18 #define CC_ERR_PERMS -103
19 #define CC_ERR_PARAMETER -104
20 #define CC_ERR_MEMORY -105
22 #define CCRNG_STATE_COMMON \
23 int (*generate)(struct ccrng_state *rng, unsigned long outlen, void *out);
25 /* default state structure - do not instantiate, instead use the specific one you need */
30 #define ccrng_generate(ctx, outlen, out) ((ctx)->generate((ctx), (outlen), (out)))
32 #endif /* _CORECRYPTO_CCRNG_H_ */