rrand.h
来自「此文件利用最新的加斯拉奇算法制造随机种子给随机数的数理统计达到最优化」· C头文件 代码 · 共 63 行
H
63 行
/*\ * RRAND RNG - Ruptor's Fast True Random Number Generator, v1.0 * http://cryptolib.com/crypto/rrand * Copyright (c) 1992-2007 Marcos el Ruptor\*/#ifndef _RRAND_H#define _RRAND_H#ifdef __cplusplusextern "C" {#endif#include "../crypto.h"#ifndef u64 #if defined(_MSC_VER)||defined(INTEL_COMPILER) #define u64 unsigned __int64 #else #define u64 unsigned long long #endif#endif#ifndef _STD_TYPES#define _STD_TYPES#define uchar unsigned char#define uint unsigned int#define ulong unsigned long int#endif#define RRAND_SIZE 64 // 64 is more than enough actually, at least for 256-bit securitytypedef struct _rrand_state{ ulong pool[RRAND_SIZE]; uint offset;}rrand_state;/** * \brief RRAND initialization * * \param hs RRAND state to be initialized */void rrand_init (rrand_state * const rr);/** * \brief RRAND rand function * * \param rng_st RRAND state * * \return A random unsigned long */ulong rrand (void * const vr);#ifdef __cplusplus}#endif#endif /* rrand.h */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?