⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rrand.h

📁 此文件利用最新的加斯拉奇算法制造随机种子给随机数的数理统计达到最优化
💻 H
字号:
/*\ * 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -