aboutsummaryrefslogtreecommitdiffstats
path: root/src/kdf/kdf.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-17 21:48:55 +0000
committerlloyd <[email protected]>2010-06-17 21:48:55 +0000
commitc06b260b3328c5ce4be44c4f1a88feb55ee3dbc4 (patch)
tree41b05df5982b5b2e8a23b55972263d2172d6a9fd /src/kdf/kdf.h
parent0eecae9f21172c0a74ad62acaf77148c94a25be7 (diff)
parent3dde5683f69b9cb9f558bfb18087ce35fbbec78a (diff)
propagate from branch 'net.randombit.botan' (head 294e2082ce9231d6165276e2f2a4153a0116aca3)
to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
Diffstat (limited to 'src/kdf/kdf.h')
-rw-r--r--src/kdf/kdf.h50
1 files changed, 44 insertions, 6 deletions
diff --git a/src/kdf/kdf.h b/src/kdf/kdf.h
index 67078218f..ecf7f4621 100644
--- a/src/kdf/kdf.h
+++ b/src/kdf/kdf.h
@@ -13,31 +13,69 @@
namespace Botan {
-/*
+/**
* Key Derivation Function
*/
class BOTAN_DLL KDF
{
public:
+ /**
+ * Derive a key
+ * @param key_len the desired output length in bytes
+ * @param secret the secret input
+ * @param salt a diversifier
+ */
SecureVector<byte> derive_key(u32bit key_len,
const MemoryRegion<byte>& secret,
const std::string& salt = "") const;
+ /**
+ * Derive a key
+ * @param key_len the desired output length in bytes
+ * @param secret the secret input
+ * @param salt a diversifier
+ */
SecureVector<byte> derive_key(u32bit key_len,
const MemoryRegion<byte>& secret,
const MemoryRegion<byte>& salt) const;
+ /**
+ * Derive a key
+ * @param key_len the desired output length in bytes
+ * @param secret the secret input
+ * @param salt a diversifier
+ * @param salt_len size of salt in bytes
+ */
SecureVector<byte> derive_key(u32bit key_len,
const MemoryRegion<byte>& secret,
- const byte salt[], u32bit salt_len) const;
+ const byte salt[],
+ u32bit salt_len) const;
+ /**
+ * Derive a key
+ * @param key_len the desired output length in bytes
+ * @param secret the secret input
+ * @param secret_len size of secret in bytes
+ * @param salt a diversifier
+ */
SecureVector<byte> derive_key(u32bit key_len,
- const byte secret[], u32bit secret_len,
+ const byte secret[],
+ u32bit secret_len,
const std::string& salt = "") const;
+ /**
+ * Derive a key
+ * @param key_len the desired output length in bytes
+ * @param secret the secret input
+ * @param secret_len size of secret in bytes
+ * @param salt a diversifier
+ * @param salt_len size of salt in bytes
+ */
SecureVector<byte> derive_key(u32bit key_len,
- const byte secret[], u32bit secret_len,
- const byte salt[], u32bit salt_len) const;
+ const byte secret[],
+ u32bit secret_len,
+ const byte salt[],
+ u32bit salt_len) const;
virtual ~KDF() {}
private:
@@ -47,7 +85,7 @@ class BOTAN_DLL KDF
const byte salt[], u32bit salt_len) const = 0;
};
-/*
+/**
* Mask Generation Function
*/
class BOTAN_DLL MGF