1. Go to this page and download the library: Download originphp/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/ */
originphp / security example snippets
use Origin\Security\Security;
$hashed = Security::hash('foo');
$hashed = Security::hash('foo',['pepper'=>'A random string']);
$hashed = Security::hash('foo',['type'=>'sha1']);
$list = hash_algos()
$hashed = Security::hashPassword('secret');
$hashed = Security::hashPassword('secret');
$bool = Security::verifyPassword($input,$hashed); // input is user inputted password
use Origin\Security\Security;
$key = Security::generateKey(); // ESaCestIJvuAo3NUAtHAZG9DqmFJZtyx
use Origin\Security\Security;
$key = '33d80476167cc95c363bf7df3c95e1d1';
$encrypted = Security::encrypt('foo',$key);