File: random128.h

package info (click to toggle)
courier 0.60.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 52,288 kB
  • ctags: 12,677
  • sloc: ansic: 165,348; cpp: 24,820; sh: 16,410; perl: 6,839; makefile: 3,621; yacc: 289; sed: 16
file content (42 lines) | stat: -rw-r--r-- 825 bytes parent folder | download | duplicates (11)
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
36
37
38
39
40
41
42
#ifndef	random128_h
#define	random128_h

/*
** Copyright 1998 - 2002 Double Precision, Inc.
** See COPYING for distribution information.
*/

#ifdef	__cplusplus
extern "C" {
#endif
static const char random128_h_rcsid[]="$Id: random128.h,v 1.4 2002/07/01 03:17:05 mrsam Exp $";

/*
	random128 returns 128 random bits from the entropy.  random128
	returns a pointer to 32 hexadecimal uppercase nibbles, all total
	being 128 bits.
*/

const char *random128();

/*
	random128_alpha does the same thing, except that the return
	string contains uppercase alphabetic letters only (letters 'A'
	through 'P').
*/

const char *random128_alpha();

/*
** random128_bin(), saves the 128 random bits in 16 bytes.
*/

typedef unsigned char random128binbuf[16];

void random128_binary(random128binbuf *);

#ifdef	__cplusplus
}
#endif

#endif