summaryrefslogtreecommitdiff
path: root/pkcspad.h
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2003-07-04 00:17:37 +0000
committerweidai <weidai11@users.noreply.github.com>2003-07-04 00:17:37 +0000
commitf278895908e663a6a5a2c1f63e5523c5004f5d20 (patch)
tree0536d87e504a82920156c239bc5ae6aa43e70ebc /pkcspad.h
parente43f74604744291d3a99b8bfe81d94af4ba6abbd (diff)
downloadcryptopp-git-f278895908e663a6a5a2c1f63e5523c5004f5d20.tar.gz
create DLL version, fix GetNextIV() bug in CTR and OFB modes
Diffstat (limited to 'pkcspad.h')
-rw-r--r--pkcspad.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/pkcspad.h b/pkcspad.h
index 2e14a5e0..1ca9ada0 100644
--- a/pkcspad.h
+++ b/pkcspad.h
@@ -4,6 +4,10 @@
#include "cryptlib.h"
#include "pubkey.h"
+#ifdef CRYPTOPP_IS_DLL
+#include "sha.h"
+#endif
+
NAMESPACE_BEGIN(CryptoPP)
//! <a href="http://www.weidai.com/scan-mirror/ca.html#cem_PKCS1-1.5">EME-PKCS1-v1_5</a>
@@ -17,14 +21,15 @@ public:
DecodingResult Unpad(const byte *padded, unsigned int paddedLength, byte *raw) const;
};
-template <class H> struct PKCS_DigestDecoration
+template <class H> class PKCS_DigestDecoration
{
+public:
static const byte decoration[];
static const unsigned int length;
};
//! <a href="http://www.weidai.com/scan-mirror/sig.html#sem_PKCS1-1.5">EMSA-PKCS1-v1_5</a>
-class PKCS1v15_SignatureMessageEncodingMethod : public PK_DeterministicSignatureMessageEncodingMethod
+class CRYPTOPP_DLL PKCS1v15_SignatureMessageEncodingMethod : public PK_DeterministicSignatureMessageEncodingMethod
{
public:
static const char * StaticAlgorithmName() {return "EMSA-PKCS1-v1_5";}
@@ -46,7 +51,7 @@ public:
};
};
-//! PKCS #1 version 1.5, for use with RSAES and RSASS
+//! PKCS #1 version 1.5, for use with RSAES and RSASSA
/*! The following hash functions are supported for signature: SHA, MD2, MD5, RIPEMD160, SHA256, SHA384, SHA512. */
struct PKCS1v15 : public SignatureStandard, public EncryptionStandard
{
@@ -54,6 +59,10 @@ struct PKCS1v15 : public SignatureStandard, public EncryptionStandard
typedef PKCS1v15_SignatureMessageEncodingMethod SignatureMessageEncodingMethod;
};
+#ifdef CRYPTOPP_IS_DLL
+CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration<SHA>;
+#endif
+
// PKCS_DecoratedHashModule can be instantiated with the following
// classes as specified in PKCS#1 v2.0 and P1363a
class SHA;