Back to index

courier  0.68.2
random128.h
Go to the documentation of this file.
00001 #ifndef       random128_h
00002 #define       random128_h
00003 
00004 /*
00005 ** Copyright 1998 - 2002 Double Precision, Inc.
00006 ** See COPYING for distribution information.
00007 */
00008 
00009 #ifdef __cplusplus
00010 extern "C" {
00011 #endif
00012 
00013 /*
00014        random128 returns 128 random bits from the entropy.  random128
00015        returns a pointer to 32 hexadecimal uppercase nibbles, all total
00016        being 128 bits.
00017 */
00018 
00019 const char *random128();
00020 
00021 /*
00022        random128_alpha does the same thing, except that the return
00023        string contains uppercase alphabetic letters only (letters 'A'
00024        through 'P').
00025 */
00026 
00027 const char *random128_alpha();
00028 
00029 /*
00030 ** random128_bin(), saves the 128 random bits in 16 bytes.
00031 */
00032 
00033 typedef unsigned char random128binbuf[16];
00034 
00035 void random128_binary(random128binbuf *);
00036 
00037 #ifdef __cplusplus
00038 }
00039 #endif
00040 
00041 #endif