aboutsummaryrefslogtreecommitdiffstats
path: root/kmac_test.go
blob: 0bddfc38edc04aa9af15187da96ac70d6a5bdc59 (plain) (blame)
1
2
3
4
5
6
7
8
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")
}