summaryrefslogtreecommitdiff
path: root/esign.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-09-10 21:01:14 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-09-10 21:01:14 +0000
commit1827e89c3a73ec8bec11820df4899aefc92e6db5 (patch)
tree29c87efe400f754b548a4cb4ba1981009b492432 /esign.h
parentb26f231cec32a485df31cdc223fe254d08554bda (diff)
downloadcryptopp-1827e89c3a73ec8bec11820df4899aefc92e6db5.tar.gz
fix multithreading bug
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@133 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'esign.h')
-rw-r--r--esign.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/esign.h b/esign.h
index 9107bb2..e930e88 100644
--- a/esign.h
+++ b/esign.h
@@ -93,17 +93,14 @@ public:
HashTransformation &hash, HashIdentifier hashIdentifier, bool messageEmpty,
byte *representative, unsigned int representativeBitLength) const
{
- m_digest.New(hash.DigestSize());
- hash.Final(m_digest);
+ SecByteBlock digest(hash.DigestSize());
+ hash.Final(digest);
unsigned int representativeByteLength = BitsToBytes(representativeBitLength);
T mgf;
- mgf.GenerateAndMask(hash, representative, representativeByteLength, m_digest, m_digest.size(), false);
+ mgf.GenerateAndMask(hash, representative, representativeByteLength, digest, digest.size(), false);
if (representativeBitLength % 8 != 0)
representative[0] = (byte)Crop(representative[0], representativeBitLength % 8);
}
-
-private:
- mutable SecByteBlock m_digest;
};
//! EMSA5, for use with ESIGN