aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/kdf.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-29 00:30:26 +0000
committerlloyd <[email protected]>2008-09-29 00:30:26 +0000
commitce1074c2ce8d37cddda35079dc279c7823766aca (patch)
treee9c8ef0c6706477666f8e1c3e82986785fc67e0b /src/core/kdf.cpp
parentd8034ff636a1b0d1d8d90058183b985f8b90e45f (diff)
Move parts of core into pk/pubkey which is at least somewhat relevant
Diffstat (limited to 'src/core/kdf.cpp')
-rw-r--r--src/core/kdf.cpp70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/core/kdf.cpp b/src/core/kdf.cpp
deleted file mode 100644
index dca56e1a6..000000000
--- a/src/core/kdf.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************
-* KDF Base Class Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#include <botan/pk_util.h>
-#include <botan/lookup.h>
-#include <botan/loadstor.h>
-#include <algorithm>
-#include <memory>
-
-namespace Botan {
-
-/*************************************************
-* Derive a key *
-*************************************************/
-SecureVector<byte> KDF::derive_key(u32bit key_len,
- const MemoryRegion<byte>& secret,
- const std::string& salt) const
- {
- return derive_key(key_len, secret, secret.size(),
- reinterpret_cast<const byte*>(salt.data()),
- salt.length());
- }
-
-/*************************************************
-* Derive a key *
-*************************************************/
-SecureVector<byte> KDF::derive_key(u32bit key_len,
- const MemoryRegion<byte>& secret,
- const byte salt[], u32bit salt_len) const
- {
- return derive_key(key_len, secret.begin(), secret.size(),
- salt, salt_len);
- }
-
-/*************************************************
-* Derive a key *
-*************************************************/
-SecureVector<byte> KDF::derive_key(u32bit key_len,
- const MemoryRegion<byte>& secret,
- const MemoryRegion<byte>& salt) const
- {
- return derive_key(key_len, secret.begin(), secret.size(),
- salt.begin(), salt.size());
- }
-
-/*************************************************
-* Derive a key *
-*************************************************/
-SecureVector<byte> KDF::derive_key(u32bit key_len,
- const byte secret[], u32bit secret_len,
- const std::string& salt) const
- {
- return derive_key(key_len, secret, secret_len,
- reinterpret_cast<const byte*>(salt.data()),
- salt.length());
- }
-
-/*************************************************
-* Derive a key *
-*************************************************/
-SecureVector<byte> KDF::derive_key(u32bit key_len,
- const byte secret[], u32bit secret_len,
- const byte salt[], u32bit salt_len) const
- {
- return derive(key_len, secret, secret_len, salt, salt_len);
- }
-
-}