PHP code example of arthurkushman / coossions
1. Go to this page and download the library: Download arthurkushman/coossions 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/ */
arthurkushman / coossions example snippets
$coossions = new CoossionsHandler('your_digest_secrete'); // any secret word
$coossions->startSession();
$_SESSION['foo'] = 123;
$_SESSION['bar'] = 'baz';
echo $_SESSION['foo'] . ' ' . $_SESSION['bar'];
$coossions = new CoossionsHandler('your_digest_secrete');
$encryptor = new Encryptor('your_digest_secrete');
$encryptor->setDigestAlgo('sha512'); // defaults to sha256
$encryptor->setCipherAlgo('aes-128-ctr'); // defaults to aes-256-ctr
$coossions->setEncryption($encryptor);
$coossions->startSession();