aboutsummaryrefslogtreecommitdiffstats
path: root/src/kdf
diff options
context:
space:
mode:
Diffstat (limited to 'src/kdf')
-rw-r--r--src/kdf/pbkdf1/pbkdf1.h11
-rw-r--r--src/kdf/pbkdf2/pbkdf2.h12
2 files changed, 16 insertions, 7 deletions
diff --git a/src/kdf/pbkdf1/pbkdf1.h b/src/kdf/pbkdf1/pbkdf1.h
index ee76e5b15..99d0188db 100644
--- a/src/kdf/pbkdf1/pbkdf1.h
+++ b/src/kdf/pbkdf1/pbkdf1.h
@@ -11,16 +11,21 @@
namespace Botan {
-/*************************************************
-* PKCS #5 PBKDF1 *
-*************************************************/
+/**
+* This class implements the PKCS #5 PBKDF1 functionality.
+*/
class BOTAN_DLL PKCS5_PBKDF1 : public S2K
{
public:
std::string name() const;
S2K* clone() const;
+ /**
+ * Create a PKCS #5 instance using the specified hash function.
+ * @param hash a pointer to a hash function object to use
+ */
PKCS5_PBKDF1(HashFunction* hash_in) : hash(hash_in) {}
+
PKCS5_PBKDF1(const PKCS5_PBKDF1& other) :
S2K(), hash(other.hash->clone()) {}
diff --git a/src/kdf/pbkdf2/pbkdf2.h b/src/kdf/pbkdf2/pbkdf2.h
index c0f0229ff..1b27c5acb 100644
--- a/src/kdf/pbkdf2/pbkdf2.h
+++ b/src/kdf/pbkdf2/pbkdf2.h
@@ -11,16 +11,20 @@
namespace Botan {
-/*************************************************
-* PKCS #5 PBKDF2 *
-*************************************************/
+/**
+* This class implements the PKCS #5 PBKDF2 functionality.
+*/
class BOTAN_DLL PKCS5_PBKDF2 : public S2K
{
public:
std::string name() const;
S2K* clone() const;
- PKCS5_PBKDF2(MessageAuthenticationCode* m);
+ /**
+ * Create a PKCS #5 instance using the specified message auth code
+ * @param mac the MAC to use
+ */
+ PKCS5_PBKDF2(MessageAuthenticationCode* mac);
~PKCS5_PBKDF2();
private:
OctetString derive(u32bit, const std::string&,