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

📄 modexppc.h

📁 一个DES,RSA,MD5,RC4等加密算法的源码
💻 H
字号:
#ifndef CRYPTOPP_MODEXPPC_H
#define CRYPTOPP_MODEXPPC_H

#include "modarith.h"
#include "eprecomp.h"
#include "smartptr.h"

NAMESPACE_BEGIN(CryptoPP)

//! .
class ModExpPrecomputation
{
public:
	ModExpPrecomputation() {}
	ModExpPrecomputation(const ModExpPrecomputation &a)
		{operator=(a);}
	ModExpPrecomputation(const Integer &modulus, const Integer &base)
		{SetModulusAndBase(modulus, base);}

	ModExpPrecomputation& operator=(const ModExpPrecomputation &rhs);

	void SetModulusAndBase(const Integer &modulus, const Integer &base);
	void Precompute(unsigned int maxExpBits, unsigned int storage);
	void Load(BufferedTransformation &storedPrecomputation);
	void Save(BufferedTransformation &storedPrecomputation) const;

	Integer Exponentiate(const Integer &exponent) const;
	Integer CascadeExponentiate(const Integer &exponent, const ModExpPrecomputation &pc2, const Integer &exponent2) const;

private:
	value_ptr<MontgomeryRepresentation> m_mr;
	ExponentiationPrecomputation<Integer> m_ep;
};

NAMESPACE_END

#endif

⌨️ 快捷键说明

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