diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-09-10 21:01:14 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-09-10 21:01:14 +0000 |
commit | 1b953a6a6c5eaa781e9ac113d848d1fda7528f8f (patch) | |
tree | 29c87efe400f754b548a4cb4ba1981009b492432 /esign.h | |
parent | 0ad5a52c9adf18fbd24ff8f66e191979806656ae (diff) | |
download | cryptopp-git-1b953a6a6c5eaa781e9ac113d848d1fda7528f8f.tar.gz |
fix multithreading bug
Diffstat (limited to 'esign.h')
-rw-r--r-- | esign.h | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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 |