diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-07-04 00:17:37 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-07-04 00:17:37 +0000 |
commit | f278895908e663a6a5a2c1f63e5523c5004f5d20 (patch) | |
tree | 0536d87e504a82920156c239bc5ae6aa43e70ebc /gf2n.cpp | |
parent | e43f74604744291d3a99b8bfe81d94af4ba6abbd (diff) | |
download | cryptopp-git-f278895908e663a6a5a2c1f63e5523c5004f5d20.tar.gz |
create DLL version, fix GetNextIV() bug in CTR and OFB modes
Diffstat (limited to 'gf2n.cpp')
-rw-r--r-- | gf2n.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,17 +1,18 @@ // gf2n.cpp - written and placed in the public domain by Wei Dai #include "pch.h" + +#ifndef CRYPTOPP_IMPORTS + #include "gf2n.h" #include "algebra.h" #include "words.h" -#include "rng.h" +#include "randpool.h" #include "asn.h" #include "oids.h" #include <iostream> -#include "algebra.cpp" - NAMESPACE_BEGIN(CryptoPP) PolynomialMod2::PolynomialMod2() @@ -551,10 +552,10 @@ GF2NP::Element GF2NP::SolveQuadraticEquation(const Element &a) const if (m%2 == 0) { Element z, w; + RandomPool rng; do { - LC_RNG rng(11111); - Element p(rng, m); + Element p((RandomNumberGenerator &)rng, m); z = PolynomialMod2::Zero(); w = p; for (unsigned int i=1; i<=m-1; i++) @@ -868,3 +869,5 @@ GF2NP * BERDecodeGF2NP(BufferedTransformation &bt) } NAMESPACE_END + +#endif |