mirror of https://github.com/golang/go.git
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`.
This commit is contained in:
parent
bc5f4a555e
commit
5ec752e0de
|
|
@ -27,7 +27,7 @@ import (
|
|||
// can get a derived key for e.g. AES-256 (which needs a 32-byte key) by
|
||||
// doing:
|
||||
//
|
||||
// dk := pbkdf2.Key(sha1.New, []byte("some password"), salt, 4096, 32)
|
||||
// dk := pbkdf2.Key(sha1.New, "some password", salt, 4096, 32)
|
||||
//
|
||||
// Remember to get a good random salt. At least 8 bytes is recommended by the
|
||||
// RFC.
|
||||
|
|
|
|||
Loading…
Reference in New Issue