File: alt_arc4random.h

package info (click to toggle)
pure-ftpd 1.0.47-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 3,212 kB
  • sloc: ansic: 29,132; sh: 1,632; makefile: 500; perl: 280
file content (35 lines) | stat: -rw-r--r-- 833 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#ifndef __ALT_ARC4RANDOM_H__
#define __ALT_ARC4RANDOM_H__ 1

#include <stdlib.h>
#include "crypto.h"

#if defined(__OpenBSD__) || defined(__Bitrig__)

#define alt_arc4random() arc4random()
#ifdef HAVE_ARC4RANDOM_STIR
# define alt_arc4random_stir() arc4random_stir()
#else
# define alt_arc4random_stir() (void) 0
#endif
#ifdef HAVE_ARC4RANDOM_ADDRANDOM
# define alt_arc4random_addrandom(A, B) arc4random_addrandom(A, B)
#else
# define alt_arc4random_addrandom(A, B) (void) 0
#endif
#define alt_arc4random_uniform(A) arc4random_uniform(A)
#define alt_arc4random_buf(A, B) arc4random_buf(A, B)

#else

void         alt_arc4random_stir(void);
void         alt_arc4random_buf(void *, size_t);
crypto_uint4 alt_arc4random(void);
crypto_uint4 alt_arc4random_uniform(crypto_uint4);

#endif

int          alt_arc4random_close(void);

#endif