vinsaj9 / scrypt
Fork of https://github.com/windlace/scrypt to support PHP 8.1. Scrypt, pure PHP based on https://github.com/MPOS/php-mpos/blob/236cccd5d3178e99504bf2665db8bddfed6aa176/include/lib/scrypt.php
v1.4
2022-08-23 07:59 UTC
Requires
- php: ^8.1
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2025-04-23 13:39:14 UTC
README
A fork of https://github.com/windlace/scrypt to make it support PHP 8.1
Scrypt
Pure PHP-implementation without any extensions
Install:
composer require vinsaj9/scrypt
Usage:
<?php use function Vinsaj9\Crypto\Scrypt\scrypt; $expected = "77d6576238657b203b19ca42c18a0497f16b4844e3074ae8dfdffa3fede21442fcd0069ded0948f8326a753a0fc81f17e8d3e0fb2e0d3628cf35e20c38d18906"; // strlen($expected) == 128 $actual = bin2hex(scrypt("", "", 16, 1, 1, 64)); // strlen($actual) == 128
Based on https://github.com/cmpscabral/cryptobits/tree/master/php/scrypt.