1. Go to this page and download the library: Download oire/colloportus 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/ */
oire / colloportus example snippets
use Oire\Colloportus\Colloportus;
use Oire\Colloportus\Exception\ColloportusException;
// Actually you need to create a key beforehand and save it somewhere, for example, in a .env file
$key = Colloportus::createKey();
if (!empty($_POST['password'])) {
try {
$storeMe = Colloportus::lock($_POST['password'], $key);
} catch (ColloportusException $e) {
// Handle errors
}
}