diff options
Diffstat (limited to 'src/pbkdf/pbkdf.cpp')
-rw-r--r-- | src/pbkdf/pbkdf.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/pbkdf/pbkdf.cpp b/src/pbkdf/pbkdf.cpp deleted file mode 100644 index ccd203dbd..000000000 --- a/src/pbkdf/pbkdf.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* -* PBKDF -* (C) 2012 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#include <botan/pbkdf.h> -#include <stdexcept> - -namespace Botan { - -OctetString PBKDF::derive_key(size_t output_len, - const std::string& passphrase, - const byte salt[], size_t salt_len, - size_t iterations) const - { - if(iterations == 0) - throw std::invalid_argument(name() + ": Invalid iteration count"); - - auto derived = key_derivation(output_len, passphrase, - salt, salt_len, iterations, - std::chrono::milliseconds(0)); - - BOTAN_ASSERT(derived.first == iterations, - "PBKDF used the correct number of iterations"); - - return derived.second; - } - -OctetString PBKDF::derive_key(size_t output_len, - const std::string& passphrase, - const byte salt[], size_t salt_len, - std::chrono::milliseconds ms, - size_t& iterations) const - { - auto derived = key_derivation(output_len, passphrase, salt, salt_len, 0, ms); - - iterations = derived.first; - - return derived.second; - } - -} |