APG v2.1.0

This commit is contained in:
Adel I. Mirzazhanov
2002-09-13 15:10:49 +07:00
committed by skinc
parent 8087f2a5e4
commit 900ff5ea18
44 changed files with 2999 additions and 880 deletions

12
rnd.h
View File

@@ -1,5 +1,5 @@
/*
** Copyright (c) 1999, 2000, 2001
** Copyright (c) 1999, 2000, 2001, 2002
** Adel I. Mirzazhanov. All rights reserved
**
** Redistribution and use in source and binary forms, with or without
@@ -37,11 +37,19 @@
extern UINT32 __rnd_seed[2];
#define RND_MX 0x7FFFFFFF
#ifdef __OpenBSD__
#define APG_DEVRANDOM "/dev/arandom"
#else
#define APG_DEVRANDOM "/dev/random"
#endif /* __OpenBSD__ */
#define APG_DEVURANDOM "/dev/urandom"
extern void x917cast_setseed (UINT32 seed);
extern void x917_setseed (UINT32 seed, int quiet);
extern UINT randint (int n);
#ifndef APG_USE_SHA
UINT32 x917cast_rnd (void);
#else /* APG_USE_SHA */
UINT32 x917sha1_rnd (void);
#endif /* APG_USE_SHA*/
#endif /* RND_H */