summaryrefslogtreecommitdiff
path: root/gfpcrypt.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-07-12 04:23:32 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-07-12 04:23:32 +0000
commitd5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47 (patch)
tree4b03760892a97a9bc452ebe8b7793bbebd402ad4 /gfpcrypt.cpp
parentfa39f51809b4da54a5c2adb3e183b1a625cefb92 (diff)
downloadcryptopp-d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47.tar.gz
port to MSVC .NET 2005 beta 2
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@198 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'gfpcrypt.cpp')
-rw-r--r--gfpcrypt.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/gfpcrypt.cpp b/gfpcrypt.cpp
index eae4f0d..a82c492 100644
--- a/gfpcrypt.cpp
+++ b/gfpcrypt.cpp
@@ -67,15 +67,15 @@ bool DL_GroupParameters_DSA::ValidateGroup(RandomNumberGenerator &rng, unsigned
}
void DL_SignatureMessageEncodingMethod_DSA::ComputeMessageRepresentative(RandomNumberGenerator &rng,
- const byte *recoverableMessage, unsigned int recoverableMessageLength,
+ const byte *recoverableMessage, size_t recoverableMessageLength,
HashTransformation &hash, HashIdentifier hashIdentifier, bool messageEmpty,
- byte *representative, unsigned int representativeBitLength) const
+ byte *representative, size_t representativeBitLength) const
{
assert(recoverableMessageLength == 0);
assert(hashIdentifier.second == 0);
- const unsigned int representativeByteLength = BitsToBytes(representativeBitLength);
- const unsigned int digestSize = hash.DigestSize();
- const unsigned int paddingLength = SaturatingSubtract(representativeByteLength, digestSize);
+ const size_t representativeByteLength = BitsToBytes(representativeBitLength);
+ const size_t digestSize = hash.DigestSize();
+ const size_t paddingLength = SaturatingSubtract(representativeByteLength, digestSize);
memset(representative, 0, paddingLength);
hash.TruncatedFinal(representative+paddingLength, STDMIN(representativeByteLength, digestSize));
@@ -89,15 +89,15 @@ void DL_SignatureMessageEncodingMethod_DSA::ComputeMessageRepresentative(RandomN
}
void DL_SignatureMessageEncodingMethod_NR::ComputeMessageRepresentative(RandomNumberGenerator &rng,
- const byte *recoverableMessage, unsigned int recoverableMessageLength,
+ const byte *recoverableMessage, size_t recoverableMessageLength,
HashTransformation &hash, HashIdentifier hashIdentifier, bool messageEmpty,
- byte *representative, unsigned int representativeBitLength) const
+ byte *representative, size_t representativeBitLength) const
{
assert(recoverableMessageLength == 0);
assert(hashIdentifier.second == 0);
- const unsigned int representativeByteLength = BitsToBytes(representativeBitLength);
- const unsigned int digestSize = hash.DigestSize();
- const unsigned int paddingLength = SaturatingSubtract(representativeByteLength, digestSize);
+ const size_t representativeByteLength = BitsToBytes(representativeBitLength);
+ const size_t digestSize = hash.DigestSize();
+ const size_t paddingLength = SaturatingSubtract(representativeByteLength, digestSize);
memset(representative, 0, paddingLength);
hash.TruncatedFinal(representative+paddingLength, STDMIN(representativeByteLength, digestSize));