Skip to content

Commit c3950f8

Browse files
Gustedgopherbot
authored andcommitted
crypto/pbkdf2: fix code example for Key
The type for password is not `[]byte` (as it was in golang.org/x/crypto/pbkdf2), it is `string`. Change-Id: I914a81a500a6d93f994b587814f26285aef7b96d GitHub-Last-Rev: 5ec752e GitHub-Pull-Request: #72746 Reviewed-on: https://go-review.googlesource.com/c/go/+/656115 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]> Reviewed-by: Daniel McCarney <[email protected]> Reviewed-by: Sean Liao <[email protected]> Auto-Submit: Sean Liao <[email protected]>
1 parent 22d5d09 commit c3950f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/crypto/pbkdf2/pbkdf2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by
2828
// doing:
2929
//
30-
// dk := pbkdf2.Key(sha1.New, []byte("some password"), salt, 4096, 32)
30+
// dk := pbkdf2.Key(sha1.New, "some password", salt, 4096, 32)
3131
//
3232
// Remember to get a good random salt. At least 8 bytes is recommended by the
3333
// RFC.

0 commit comments

Comments
 (0)