Skip to content

Instantly share code, notes, and snippets.

@Treeston
Created July 28, 2020 12:14
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Treeston/40b99dd71f55d55c68857919088b2e41 to your computer and use it in GitHub Desktop.
Save Treeston/40b99dd71f55d55c68857919088b2e41 to your computer and use it in GitHub Desktop.
<?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