-
-
Save Treeston/40b99dd71f55d55c68857919088b2e41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function GetSRP6RegistrationData($username, $password) | |
{ | |
// generate a random salt | |
$salt = random_bytes(32); | |
// calculate verifier using this salt | |
$verifier = CalculateSRP6Verifier($username, $password, $salt); | |
// done - this is what you put in the account table! | |
return array($salt, $verifier); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment