aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/des/desx.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-01 21:20:55 +0000
committerlloyd <[email protected]>2014-01-01 21:20:55 +0000
commit197dc467dec28a04c3b2f30da7cef122dfbb13e9 (patch)
treecdbd3ddaec051c72f0a757db461973d90c37b97a /src/block/des/desx.cpp
parent62faac373c07cfe10bc8c309e89ebdd30d8e5eaa (diff)
Shuffle things around. Add NIST X.509 test to build.
Diffstat (limited to 'src/block/des/desx.cpp')
-rw-r--r--src/block/des/desx.cpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/block/des/desx.cpp b/src/block/des/desx.cpp
deleted file mode 100644
index 879e73ee9..000000000
--- a/src/block/des/desx.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-* DES
-* (C) 1999-2007 Jack Lloyd
-*
-* Distributed under the terms of the Botan license
-*/
-
-#include <botan/desx.h>
-#include <botan/internal/xor_buf.h>
-
-namespace Botan {
-
-/*
-* DESX Encryption
-*/
-void DESX::encrypt_n(const byte in[], byte out[], size_t blocks) const
- {
- for(size_t i = 0; i != blocks; ++i)
- {
- xor_buf(out, in, &K1[0], BLOCK_SIZE);
- des.encrypt(out);
- xor_buf(out, &K2[0], BLOCK_SIZE);
-
- in += BLOCK_SIZE;
- out += BLOCK_SIZE;
- }
- }
-
-/*
-* DESX Decryption
-*/
-void DESX::decrypt_n(const byte in[], byte out[], size_t blocks) const
- {
- for(size_t i = 0; i != blocks; ++i)
- {
- xor_buf(out, in, &K2[0], BLOCK_SIZE);
- des.decrypt(out);
- xor_buf(out, &K1[0], BLOCK_SIZE);
-
- in += BLOCK_SIZE;
- out += BLOCK_SIZE;
- }
- }
-
-/*
-* DESX Key Schedule
-*/
-void DESX::key_schedule(const byte key[], size_t)
- {
- K1.assign(key, key + 8);
- des.set_key(key + 8, 8);
- K2.assign(key + 16, key + 24);
- }
-
-void DESX::clear()
- {
- des.clear();
- zap(K1);
- zap(K2);
- }
-
-}