PHP code example of shiwildy / sencrypt
1. Go to this page and download the library: Download shiwildy/sencrypt 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/ */
shiwildy / sencrypt example snippets
hiWildy\SEncrypt;
$plaintext = "Hello, just testing..";
$password = "secret";
try {
$encrypted = SEncrypt::encrypt($plaintext, $password);
echo "Encrypted: " . $encrypted . "\n\n";
$decrypted = SEncrypt::decrypt($encrypted, $password);
echo "Decrypted: " . $decrypted . "\n\n";
} catch (Exception $e) {
echo "An error occurred: " . $e->getMessage() . "\n";
}