PHP code example of nice / security

1. Go to this page and download the library: Download nice/security library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nice / security example snippets




(@open('php://stdin', 'r');

echo "Enter password to hash: ";

$pass = fgets($in);
// trim newline
$pass = substr($pass, 0, strlen($pass) - 1);

$hash = password_hash($pass, PASSWORD_DEFAULT);

echo "Hashed result:\n";
echo $hash."\n\n";