PHP code example of affinity4 / cipher
1. Go to this page and download the library: Download affinity4/cipher 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/ */
affinity4 / cipher example snippets
// Used by both excrypt and decrypt methods, so should be available globally
// Perhaps as an environment variable
$key = 'b1f1e6225cb2b6d0230b16125e45ca63';
$str = 'my secret';
$encrypted = \Affinity4\Cipher\Cipher::encrypt($str, $key); // piqwpeiqep12801aqwie0248quqjowq==
$decrypted = \Affinity4\Cipher\Cipher::decrypt($encrypted, $key); // my secret