From 572fe07633123ce38abf28c6426356e37aef3a99 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 4 Jul 2003 00:17:37 +0000 Subject: create DLL version, fix GetNextIV() bug in CTR and OFB modes git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@87 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- des.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'des.h') diff --git a/des.h b/des.h index 5a7f2df..a6c5672 100644 --- a/des.h +++ b/des.h @@ -11,7 +11,7 @@ NAMESPACE_BEGIN(CryptoPP) struct DES_Info : public FixedBlockSize<8>, public FixedKeyLength<8> { - static const char *StaticAlgorithmName() {return "DES";} + CRYPTOPP_DLL static const char * StaticAlgorithmName() {return "DES";} }; /// DES @@ -21,7 +21,7 @@ struct DES_Info : public FixedBlockSize<8>, public FixedKeyLength<8> check or correct the parity bits if you wish. */ class DES : public DES_Info, public BlockCipherDocumentation { - class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate + class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length = 8); @@ -42,19 +42,19 @@ public: //! correct DES key parity bits static void CorrectKeyParityBits(byte *key); - typedef BlockCipherTemplate Encryption; - typedef BlockCipherTemplate Decryption; + typedef BlockCipherFinal Encryption; + typedef BlockCipherFinal Decryption; }; struct DES_EDE2_Info : public FixedBlockSize<8>, public FixedKeyLength<16> { - static const char *StaticAlgorithmName() {return "DES-EDE2";} + CRYPTOPP_DLL static const char * StaticAlgorithmName() {return "DES-EDE2";} }; /// DES-EDE2 class DES_EDE2 : public DES_EDE2_Info, public BlockCipherDocumentation { - class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate + class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl { public: void UncheckedSetKey(CipherDir direction, const byte *userKey, unsigned int length); @@ -65,19 +65,19 @@ class DES_EDE2 : public DES_EDE2_Info, public BlockCipherDocumentation }; public: - typedef BlockCipherTemplate Encryption; - typedef BlockCipherTemplate Decryption; + typedef BlockCipherFinal Encryption; + typedef BlockCipherFinal Decryption; }; struct DES_EDE3_Info : public FixedBlockSize<8>, public FixedKeyLength<24> { - static const char *StaticAlgorithmName() {return "DES-EDE3";} + CRYPTOPP_DLL static const char * StaticAlgorithmName() {return "DES-EDE3";} }; /// DES-EDE3 class DES_EDE3 : public DES_EDE3_Info, public BlockCipherDocumentation { - class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate + class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl { public: void UncheckedSetKey(CipherDir dir, const byte *key, unsigned int length); @@ -88,8 +88,8 @@ class DES_EDE3 : public DES_EDE3_Info, public BlockCipherDocumentation }; public: - typedef BlockCipherTemplate Encryption; - typedef BlockCipherTemplate Decryption; + typedef BlockCipherFinal Encryption; + typedef BlockCipherFinal Decryption; }; struct DES_XEX3_Info : public FixedBlockSize<8>, public FixedKeyLength<24> @@ -100,7 +100,7 @@ struct DES_XEX3_Info : public FixedBlockSize<8>, public FixedKeyLength<24> /// DES-XEX3, AKA DESX class DES_XEX3 : public DES_XEX3_Info, public BlockCipherDocumentation { - class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate + class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl { public: void UncheckedSetKey(CipherDir dir, const byte *key, unsigned int length); @@ -112,8 +112,8 @@ class DES_XEX3 : public DES_XEX3_Info, public BlockCipherDocumentation }; public: - typedef BlockCipherTemplate Encryption; - typedef BlockCipherTemplate Decryption; + typedef BlockCipherFinal Encryption; + typedef BlockCipherFinal Decryption; }; typedef DES::Encryption DESEncryption; -- cgit v1.2.1