Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Created February 25, 2016 15:42
Show Gist options
  • Save AndyNovo/8bf43b6843b6a94deef1 to your computer and use it in GitHub Desktop.
Save AndyNovo/8bf43b6843b6a94deef1 to your computer and use it in GitHub Desktop.
<?php
$salt = openssl_random_pseudo_bytes(40, $was_strong);
if (!$was_strong){
die("Oh no...");
}
echo bin2hex($salt);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment