Skip to content

Commit

Permalink
Simplified CryptKdfKeygen
Browse files Browse the repository at this point in the history
  • Loading branch information
David Michael committed Jun 18, 2017
1 parent 355e5dc commit a0dd7f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cryptokdf/crypto_kdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ func CryptoKdfBytesMax() int {
return int(C.crypto_kdf_bytes_max())
}

func CryptoKdfKeygen(k []byte) {
support.CheckSize(k, CryptoKdfKeybytes(), "keybytes")
func CryptoKdfKeygen() []byte {
k := make([]byte, CryptoKdfKeybytes())
C.crypto_kdf_keygen((*C.uchar)(&k[0]))
return k
}

func CryptoKdfDeriveFromKey(l int, i uint64, c string, k []byte) ([]byte, int) {
Expand Down

0 comments on commit a0dd7f9

Please sign in to comment.