summaryrefslogtreecommitdiff
path: root/des.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-04 00:17:37 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-07-04 00:17:37 +0000
commit572fe07633123ce38abf28c6426356e37aef3a99 (patch)
tree0536d87e504a82920156c239bc5ae6aa43e70ebc /des.h
parent3e8c979ddc194e043567c036321e67c89f847362 (diff)
downloadcryptopp-572fe07633123ce38abf28c6426356e37aef3a99.tar.gz
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
Diffstat (limited to 'des.h')
-rw-r--r--des.h30
1 files changed, 15 insertions, 15 deletions
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";}
};
/// <a href="http://www.weidai.com/scan-mirror/cs.html#DES">DES</a>
@@ -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<DES_Info>
+ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<DES_Info>
{
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, Base> Encryption;
- typedef BlockCipherTemplate<DECRYPTION, Base> Decryption;
+ typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
+ typedef BlockCipherFinal<DECRYPTION, Base> 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";}
};
/// <a href="http://www.weidai.com/scan-mirror/cs.html#DESede">DES-EDE2</a>
class DES_EDE2 : public DES_EDE2_Info, public BlockCipherDocumentation
{
- class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<DES_EDE2_Info>
+ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<DES_EDE2_Info>
{
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, Base> Encryption;
- typedef BlockCipherTemplate<DECRYPTION, Base> Decryption;
+ typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
+ typedef BlockCipherFinal<DECRYPTION, Base> 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";}
};
/// <a href="http://www.weidai.com/scan-mirror/cs.html#DESede">DES-EDE3</a>
class DES_EDE3 : public DES_EDE3_Info, public BlockCipherDocumentation
{
- class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<DES_EDE3_Info>
+ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<DES_EDE3_Info>
{
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, Base> Encryption;
- typedef BlockCipherTemplate<DECRYPTION, Base> Decryption;
+ typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
+ typedef BlockCipherFinal<DECRYPTION, Base> 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>
/// <a href="http://www.weidai.com/scan-mirror/cs.html#DESX">DES-XEX3</a>, AKA DESX
class DES_XEX3 : public DES_XEX3_Info, public BlockCipherDocumentation
{
- class CRYPTOPP_NO_VTABLE Base : public BlockCipherBaseTemplate<DES_XEX3_Info>
+ class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<DES_XEX3_Info>
{
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, Base> Encryption;
- typedef BlockCipherTemplate<DECRYPTION, Base> Decryption;
+ typedef BlockCipherFinal<ENCRYPTION, Base> Encryption;
+ typedef BlockCipherFinal<DECRYPTION, Base> Decryption;
};
typedef DES::Encryption DESEncryption;