intutils.h

来自「伯克利做的SFTP安全文件传输协议」· C头文件 代码 · 共 36 行

H
36
字号
// intutils.h// utilities built on sint.h for SafeTP// copyright SafeTP Development Group, Inc., 2000  Terms of use are as specified in license.txt#ifndef __INTUTILS_H#define __INTUTILS_H#include "sint.h"       // Integer#include "cryptlib.h"   // RandomNumberGeneratorclass RNG_Wrapper : public Integer::RandomSource {  RandomNumberGenerator &rng;public:  RNG_Wrapper(RandomNumberGenerator &r) : rng(r) {}  void getRandomBytes(unsigned char *dest, int numBytes)    { rng.GetBlock(dest, numBytes); }};// assist with translation from Wei Dai's Integer classinline Integer a_exp_b_mod_c(Integer const &a, Integer const &b,                             Integer const &c){  return a.expMod(b, c);}Integer pickRandom(RandomNumberGenerator &rng,                   Integer const &lo, Integer const &hi);#endif // __INTUTILS_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?