Skip to content

Commit b322c01

Browse files
committed
Moved pbkdf and updated updated readme.md
1 parent a43614b commit b322c01

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

Passwords/php-hashes/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,15 @@ For bcrypt, passwords are automatically truncated to 72 characters, so as long a
3333
[Bcrypt example](https://3v4l.org/MsfS0)
3434

3535
Descrypt have similar behavior to bcrypt, but passwords are instead truncated to 8 characters.
36+
37+
- - -
38+
39+
## Pre-hashed
40+
41+
<!--- Modified from https://github.com/spaze/hashes?tab%253Dreadme-ov-file#pbkdf2-hmac-sha1-pbkdf2-hmac-sha224-pbkdf2-hmac-sha256-->
42+
43+
If you use a password longer than 64 bytes and hash it with PBKDF2-HMAC-SHA1, it is first pre-hashed with SHA1.
44+
45+
For example, `PBKDF2-HMAC-SHA1(password1) === PBKDF2-HMAC-SHA1(password2)` as `sha1(password1) === bin2hex(password2)`.
46+
47+
This behavior can also be seen in `PBKDF2-HMAC-SHA224` and `PBKDF2-HMAC-SHA256`.

0 commit comments

Comments
 (0)