diff --git a/pkcspad.cpp b/pkcspad.cpp index 7cee9b95..0ce0aa55 100644 --- a/pkcspad.cpp +++ b/pkcspad.cpp @@ -11,11 +11,11 @@ NAMESPACE_BEGIN(CryptoPP) // more in dll.cpp -template<> const byte PKCS_DigestDecoration::decoration[] = {0x30,0x20,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x02,0x05,0x00,0x04,0x10}; -template<> const unsigned int PKCS_DigestDecoration::length = sizeof(PKCS_DigestDecoration::decoration); +template<> const byte PKCS_DigestDecoration::decoration[] = {0x30,0x20,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x02,0x05,0x00,0x04,0x10}; +template<> const unsigned int PKCS_DigestDecoration::length = sizeof(PKCS_DigestDecoration::decoration); -template<> const byte PKCS_DigestDecoration::decoration[] = {0x30,0x20,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x04,0x10}; -template<> const unsigned int PKCS_DigestDecoration::length = sizeof(PKCS_DigestDecoration::decoration); +template<> const byte PKCS_DigestDecoration::decoration[] = {0x30,0x20,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x04,0x10}; +template<> const unsigned int PKCS_DigestDecoration::length = sizeof(PKCS_DigestDecoration::decoration); template<> const byte PKCS_DigestDecoration::decoration[] = {0x30,0x21,0x30,0x09,0x06,0x05,0x2b,0x24,0x03,0x02,0x01,0x05,0x00,0x04,0x14}; template<> const unsigned int PKCS_DigestDecoration::length = sizeof(PKCS_DigestDecoration::decoration); diff --git a/pkcspad.h b/pkcspad.h index 91eac889..4d890890 100644 --- a/pkcspad.h +++ b/pkcspad.h @@ -31,14 +31,16 @@ public: // PKCS_DigestDecoration can be instantiated with the following // classes as specified in PKCS#1 v2.0 and P1363a class SHA1; -class MD2; -class MD5; class RIPEMD160; class Tiger; class SHA224; class SHA256; class SHA384; class SHA512; +namespace Weak { +class MD2; +class MD5; +} // end of list #ifdef CRYPTOPP_IS_DLL diff --git a/regtest.cpp b/regtest.cpp index a59e0d41..a029b01d 100644 --- a/regtest.cpp +++ b/regtest.cpp @@ -1,10 +1,10 @@ #include "factory.h" +#define CRYPTOPP_ENABLE_NAMESPACE_WEAK #include "modes.h" #include "dh.h" #include "esign.h" #include "md2.h" -#include "trunhash.h" #include "rw.h" #include "md5.h" #include "rsa.h" @@ -20,6 +20,10 @@ #include "pssr.h" #include "aes.h" #include "salsa.h" +#include "vmac.h" +#include "tiger.h" +#include "md5.h" +#include "sosemanuk.h" USING_NAMESPACE(CryptoPP) @@ -30,6 +34,7 @@ void RegisterFactories() return; RegisterDefaultFactoryFor(); + RegisterDefaultFactoryFor(); RegisterDefaultFactoryFor(); RegisterDefaultFactoryFor(); RegisterDefaultFactoryFor(); @@ -37,30 +42,35 @@ void RegisterFactories() RegisterDefaultFactoryFor(); RegisterDefaultFactoryFor(); RegisterDefaultFactoryFor(); + RegisterDefaultFactoryFor(); #endif - RegisterDefaultFactoryFor >(); - RegisterDefaultFactoryFor >(); - RegisterDefaultFactoryFor >(); + RegisterDefaultFactoryFor(); + RegisterDefaultFactoryFor(); + RegisterDefaultFactoryFor(); + RegisterDefaultFactoryFor(); + RegisterDefaultFactoryFor >(); + RegisterDefaultFactoryFor >(); + RegisterDefaultFactoryFor >(); RegisterDefaultFactoryFor >(); RegisterDefaultFactoryFor >(); RegisterDefaultFactoryFor(); - RegisterDefaultFactoryFor >(); - RegisterDefaultFactoryFor >(); + RegisterDefaultFactoryFor >(); + RegisterDefaultFactoryFor >(); + RegisterDefaultFactoryFor >(); + RegisterDefaultFactoryFor >(); RegisterAsymmetricCipherDefaultFactories > >("RSA/OAEP-MGF1(SHA-1)"); RegisterAsymmetricCipherDefaultFactories >("DLIES(NoCofactorMultiplication, KDF2(SHA-1), XOR, HMAC(SHA-1), DHAES)"); RegisterSignatureSchemeDefaultFactories("DSA(1363)"); RegisterSignatureSchemeDefaultFactories >("NR(1363)/EMSA1(SHA-1)"); RegisterSignatureSchemeDefaultFactories >("DSA-1363/EMSA1(SHA-1)"); - RegisterSignatureSchemeDefaultFactories >("RSA/PKCS1-1.5(MD2)"); + RegisterSignatureSchemeDefaultFactories >("RSA/PKCS1-1.5(MD2)"); RegisterSignatureSchemeDefaultFactories >("RSA/PKCS1-1.5(SHA-1)"); RegisterSignatureSchemeDefaultFactories >("ESIGN/EMSA5-MGF1(SHA-1)"); RegisterSignatureSchemeDefaultFactories >("RW/EMSA2(SHA-1)"); RegisterSignatureSchemeDefaultFactories >("RSA/PSS-MGF1(SHA-1)"); RegisterSymmetricCipherDefaultFactories >(); RegisterSymmetricCipherDefaultFactories >(); -#ifdef WORD64_AVAILABLE RegisterSymmetricCipherDefaultFactories >(); -#endif RegisterSymmetricCipherDefaultFactories >(); RegisterSymmetricCipherDefaultFactories >(); RegisterSymmetricCipherDefaultFactories >(); @@ -71,6 +81,7 @@ void RegisterFactories() RegisterSymmetricCipherDefaultFactories >(); RegisterSymmetricCipherDefaultFactories >(); RegisterSymmetricCipherDefaultFactories(); + RegisterSymmetricCipherDefaultFactories(); s_registered = true; }