diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-03-20 20:39:59 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2003-03-20 20:39:59 +0000 |
commit | ec56662ba7b4cfaf1335a88854127fac06f376aa (patch) | |
tree | c85dd5aa14780d400b30c133fa3704b044d1bbb2 /blumshub.cpp | |
parent | 4feec7c333fd1ec92d1dd8c7f741249e3919ec5e (diff) | |
download | cryptopp-ec56662ba7b4cfaf1335a88854127fac06f376aa.tar.gz |
fix warnings for VC7 and GCC
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@43 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'blumshub.cpp')
-rw-r--r-- | blumshub.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/blumshub.cpp b/blumshub.cpp index f715c84..40c654a 100644 --- a/blumshub.cpp +++ b/blumshub.cpp @@ -41,9 +41,11 @@ BlumBlumShub::BlumBlumShub(const Integer &p, const Integer &q, const Integer &se void BlumBlumShub::Seek(dword index) { - Integer e = a_exp_b_mod_c (2, ((index*8) / maxBits + 1), (p-1)*(q-1)); + Integer i(Integer::POSITIVE, HIGH_WORD(index), word(index)); + i *= 8; + Integer e = a_exp_b_mod_c (2, i / maxBits + 1, (p-1)*(q-1)); current = modn.Exponentiate(x0, e); - bitsLeft = maxBits - int((index*8) % maxBits); + bitsLeft = maxBits - i % maxBits; } NAMESPACE_END |