Skip to content

Instantly share code, notes, and snippets.

@blackthornedk
Last active April 19, 2018 14:01
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 blackthornedk/5a200b77b0fe1e8d02fb4436edb0b4bd to your computer and use it in GitHub Desktop.
Save blackthornedk/5a200b77b0fe1e8d02fb4436edb0b4bd to your computer and use it in GitHub Desktop.
PHP crypt test
<?php
echo crypt('1234ABCD5678EFGH', 'SA') . '<br />';
echo crypt('1234ABCD', 'SA') . '<br />';
echo '<br />';
echo crypt('1234ABCD5678EFGH', base64_encode('1234ABCD5678EFGH')) . '<br />';
echo crypt('1234ABCD', base64_encode('1234ABCD')) . '<br />';
echo '<br />';
echo crypt('1234ABCD5678EFGH', '_J9..rasm') . '<br />';
echo crypt('1234ABCD', '_J9..rasm') . '<br />';
echo '<br />';
echo crypt('1234ABCD5678EFGH', '$5$usesomesillystringforsalt$') . '<br />';
echo crypt('1234ABCD', '$5$usesomesillystringforsalt$') . '<br />';
echo '<br />';
echo crypt('1234ABCD5678EFGH', '$6$usesomesillystringforsalt$') . '<br />';
echo crypt('1234ABCD', '$6$usesomesillystringforsalt$') . '<br />';
echo '<br />';
echo crypt('1234ABCD5678EFGH', '$5$rounds=5000$usesomesillystringforsalt$') . '<br />';
echo crypt('1234ABCD', '$5$rounds=5000$usesomesillystringforsalt$') . '<br />';
echo '<br />';
echo crypt('1234ABCD5678EFGH', '$6$rounds=5000$usesomesillystringforsalt$') . '<br />';
echo crypt('1234ABCD', '$6$rounds=5000$usesomesillystringforsalt$') . '<br />';
echo '<br />';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment