The McfHash class is a PHP implementation of Binary Modular Crypt Format (BMCF) encoding. Only the Bcrypt BMCF definition is implemented.
You can use McfHash::decode()
to convert a Bcrypt hash from the usual 60-character notation to its compact 40-byte binary form.
$hash = '$2y$14$i5btSOiulHhaPHPbgNUGdObga/GC.AVG/y5HHY1ra7L0C9dpCaw8u'; // 60 bytes ACSII $mcfEncoder = new McfHash(); $binaryHash = $mcfEncoder->decode($hash); // 40 bytes binary
Use McfHash::encode()
to reconstruct the hash.
$hash = $mcfEncoder->encode($binaryHash); // $2y$14$i5btSOiulHhaPHPbgNUGdObga/GC.AVG/y5HHY1ra7L0C9dpCaw8u
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4