summaryrefslogtreecommitdiff
path: root/dll.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-01-20 04:19:35 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-01-20 04:19:35 +0000
commit242d67fb17619670d9b757c442dcf2e26d8478a1 (patch)
tree1f61e8bf59450a028415e5a3f08565a6ceb86afe /dll.cpp
parent4b85e6cac0d84aaf65d0695adb137ae956e4e241 (diff)
downloadcryptopp-242d67fb17619670d9b757c442dcf2e26d8478a1.tar.gz
changes done for FIPS-140 lab code drop
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@195 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'dll.cpp')
-rw-r--r--dll.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/dll.cpp b/dll.cpp
index dcebc70..22003c3 100644
--- a/dll.cpp
+++ b/dll.cpp
@@ -37,8 +37,11 @@ CRYPTOPP_DLL_TEMPLATE_CLASS AdditiveCipherTemplate<AbstractPolicyHolder<Additive
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain<Integer>;
#endif
-template<> const byte PKCS_DigestDecoration<SHA>::decoration[] = {0x30,0x21,0x30,0x09,0x06,0x05,0x2B,0x0E,0x03,0x02,0x1A,0x05,0x00,0x04,0x14};
-template<> const unsigned int PKCS_DigestDecoration<SHA>::length = sizeof(PKCS_DigestDecoration<SHA>::decoration);
+template<> const byte PKCS_DigestDecoration<SHA1>::decoration[] = {0x30,0x21,0x30,0x09,0x06,0x05,0x2B,0x0E,0x03,0x02,0x1A,0x05,0x00,0x04,0x14};
+template<> const unsigned int PKCS_DigestDecoration<SHA1>::length = sizeof(PKCS_DigestDecoration<SHA1>::decoration);
+
+template<> const byte PKCS_DigestDecoration<SHA224>::decoration[] = {0x30,0x2d,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x04,0x05,0x00,0x04,0x1c};
+template<> const unsigned int PKCS_DigestDecoration<SHA224>::length = sizeof(PKCS_DigestDecoration<SHA224>::decoration);
template<> const byte PKCS_DigestDecoration<SHA256>::decoration[] = {0x30,0x31,0x30,0x0d,0x06,0x09,0x60,0x86,0x48,0x01,0x65,0x03,0x04,0x02,0x01,0x05,0x00,0x04,0x20};
template<> const unsigned int PKCS_DigestDecoration<SHA256>::length = sizeof(PKCS_DigestDecoration<SHA256>::decoration);
@@ -50,6 +53,7 @@ template<> const byte PKCS_DigestDecoration<SHA512>::decoration[] = {0x30,0x51,0
template<> const unsigned int PKCS_DigestDecoration<SHA512>::length = sizeof(PKCS_DigestDecoration<SHA512>::decoration);
template<> const byte EMSA2HashId<SHA>::id = 0x33;
+template<> const byte EMSA2HashId<SHA224>::id = 0x38;
template<> const byte EMSA2HashId<SHA256>::id = 0x34;
template<> const byte EMSA2HashId<SHA384>::id = 0x36;
template<> const byte EMSA2HashId<SHA512>::id = 0x35;
@@ -69,7 +73,7 @@ using std::set_new_handler;
static PNew s_pNew = NULL;
static PDelete s_pDelete = NULL;
-static void * CRYPTOPP_CDECL New (size_t size)
+static void * New (size_t size)
{
void *p;
while (!(p = malloc(size)))
@@ -129,7 +133,7 @@ static void SetNewAndDeleteFunctionPointers()
throw 0;
}
-void * CRYPTOPP_CDECL operator new (size_t size)
+void * operator new (size_t size)
{
if (!s_pNew)
SetNewAndDeleteFunctionPointers();
@@ -137,17 +141,17 @@ void * CRYPTOPP_CDECL operator new (size_t size)
return s_pNew(size);
}
-void CRYPTOPP_CDECL operator delete (void * p)
+void operator delete (void * p)
{
s_pDelete(p);
}
-void * CRYPTOPP_CDECL operator new [] (size_t size)
+void * operator new [] (size_t size)
{
return operator new (size);
}
-void CRYPTOPP_CDECL operator delete [] (void * p)
+void operator delete [] (void * p)
{
operator delete (p);
}