summaryrefslogtreecommitdiff
path: root/emsa2.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 /emsa2.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 'emsa2.cpp')
-rwxr-xr-xemsa2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/emsa2.cpp b/emsa2.cpp
index ef8672e..3dbb7e8 100755
--- a/emsa2.cpp
+++ b/emsa2.cpp
@@ -8,17 +8,17 @@
NAMESPACE_BEGIN(CryptoPP)
void EMSA2Pad::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(representativeBitLength >= MinRepresentativeBitLength(hashIdentifier.second, hash.DigestSize()));
if (representativeBitLength % 8 != 7)
throw PK_SignatureScheme::InvalidKeyLength("EMSA2: EMSA2 requires a key length that is a multiple of 8");
- unsigned int digestSize = hash.DigestSize();
- unsigned int representativeByteLength = BitsToBytes(representativeBitLength);
+ size_t digestSize = hash.DigestSize();
+ size_t representativeByteLength = BitsToBytes(representativeBitLength);
representative[0] = messageEmpty ? 0x4b : 0x6b;
memset(representative+1, 0xbb, representativeByteLength-digestSize-4); // pad with 0xbb