summaryrefslogtreecommitdiffstats
path: root/botan/src/kdf/kdf1/kdf1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'botan/src/kdf/kdf1/kdf1.cpp')
-rw-r--r--botan/src/kdf/kdf1/kdf1.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/botan/src/kdf/kdf1/kdf1.cpp b/botan/src/kdf/kdf1/kdf1.cpp
new file mode 100644
index 0000000..539d9ed
--- /dev/null
+++ b/botan/src/kdf/kdf1/kdf1.cpp
@@ -0,0 +1,24 @@
+/*
+* KDF1
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
+
+#include <botan/kdf1.h>
+
+namespace Botan {
+
+/*
+* KDF1 Key Derivation Mechanism
+*/
+SecureVector<byte> KDF1::derive(u32bit,
+ const byte secret[], u32bit secret_len,
+ const byte P[], u32bit P_len) const
+ {
+ hash->update(secret, secret_len);
+ hash->update(P, P_len);
+ return hash->final();
+ }
+
+}