diff options
Diffstat (limited to 'src/libstate')
-rw-r--r-- | src/libstate/get_enc.cpp | 4 | ||||
-rw-r--r-- | src/libstate/info.txt | 2 | ||||
-rw-r--r-- | src/libstate/lookup.h | 28 |
3 files changed, 22 insertions, 12 deletions
diff --git a/src/libstate/get_enc.cpp b/src/libstate/get_enc.cpp index ab4d15896..a825a5d24 100644 --- a/src/libstate/get_enc.cpp +++ b/src/libstate/get_enc.cpp @@ -81,9 +81,9 @@ namespace Botan { /* -* Get a S2K algorithm by name +* Get a PBKDF algorithm by name */ -S2K* get_s2k(const std::string& algo_spec) +PBKDF* get_pbkdf(const std::string& algo_spec) { SCAN_Name request(algo_spec); diff --git a/src/libstate/info.txt b/src/libstate/info.txt index 0829506fb..749b6afaf 100644 --- a/src/libstate/info.txt +++ b/src/libstate/info.txt @@ -35,10 +35,10 @@ mac mode_pad mutex noop_mutex +pbkdf pk_pad pubkey rng -s2k stream system_alloc </requires> diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h index debcee52b..178f80428 100644 --- a/src/libstate/lookup.h +++ b/src/libstate/lookup.h @@ -15,7 +15,7 @@ #include <botan/kdf.h> #include <botan/eme.h> #include <botan/emsa.h> -#include <botan/s2k.h> +#include <botan/pbkdf.h> namespace Botan { @@ -130,11 +130,21 @@ inline MessageAuthenticationCode* get_mac(const std::string& algo_spec) } /** -* String to key algorithm factory method. -* @param algo_spec the name of the desired string to key (S2K) algorithm -* @return pointer to the string to key algorithm object +* Password based key derivation function factory method +* @param algo_spec the name of the desired PBKDF algorithm +* @return pointer to newly allocated object of that type */ -BOTAN_DLL S2K* get_s2k(const std::string& algo_spec); +BOTAN_DLL PBKDF* get_pbkdf(const std::string& algo_spec); + +/** +* @deprecated Use get_pbkdf +* @param algo_spec the name of the desired algorithm +* @return pointer to newly allocated object of that type +*/ +inline PBKDF* get_s2k(const std::string& algo_spec) + { + return get_pbkdf(algo_spec); + } /* * Get an EMSA/EME/KDF/MGF function @@ -145,7 +155,7 @@ BOTAN_DLL S2K* get_s2k(const std::string& algo_spec); /** * Factory method for EME (message-encoding methods for encryption) objects * @param algo_spec the name of the EME to create -* @return pointer to the desired EME object +* @return pointer to newly allocated object of that type */ BOTAN_DLL EME* get_eme(const std::string& algo_spec); @@ -153,14 +163,14 @@ BOTAN_DLL EME* get_eme(const std::string& algo_spec); * Factory method for EMSA (message-encoding methods for signatures * with appendix) objects * @param algo_spec the name of the EME to create -* @return pointer to the desired EME object +* @return pointer to newly allocated object of that type */ BOTAN_DLL EMSA* get_emsa(const std::string& algo_spec); /** * Factory method for KDF (key derivation function) * @param algo_spec the name of the KDF to create -* @return pointer to the desired KDF object +* @return pointer to newly allocated object of that type */ BOTAN_DLL KDF* get_kdf(const std::string& algo_spec); @@ -176,7 +186,7 @@ BOTAN_DLL KDF* get_kdf(const std::string& algo_spec); * @param iv the initialization vector to be used * @param direction determines whether the filter will be an encrypting * or decrypting filter -* @return pointer to the encryption or decryption filter +* @return pointer to newly allocated encryption or decryption filter */ BOTAN_DLL Keyed_Filter* get_cipher(const std::string& algo_spec, const SymmetricKey& key, |