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:
Gusted 2025-03-08 18:23:04 +01:00 committed by GitHub
parent bc5f4a555e
commit 5ec752e0de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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.