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 */
20struct 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_ */
27