aboutsummaryrefslogtreecommitdiffstats
path: root/kmac_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'kmac_test.go')
-rw-r--r--kmac_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/kmac_test.go b/kmac_test.go
new file mode 100644
index 0000000..0bddfc3
--- /dev/null
+++ b/kmac_test.go
@@ -0,0 +1,9 @@
+package kmac
+
+func Example_kdf() {
+ inputKey := []byte(`A random or pseudorandom key, perhaps shared through ECDH or derived from a user password`)
+ context := []byte(`A non-secret value; consider using a random salt`)
+ const desiredKeyLen = 4096
+ derivedKeyMaterial := make([]byte, desiredKeyLen)
+ KMAC256(derivedKeyMaterial, inputKey, context, "KDF")
+}