Skip to content

Instantly share code, notes, and snippets.

@abderraouf-adjal
Created August 8, 2016 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abderraouf-adjal/dfcf6ea78fe0c05e56dbbe1f5dd5419f to your computer and use it in GitHub Desktop.
Save abderraouf-adjal/dfcf6ea78fe0c05e56dbbe1f5dd5419f to your computer and use it in GitHub Desktop.
make_token:
$token = mcrypt_create_iv(20, MCRYPT_DEV_URANDOM);
if ($token === FALSE) {
goto make_token;
}
$token = bin2hex($token);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment