PHP code example of wemxo / encryption-bundle
1. Go to this page and download the library: Download wemxo/encryption-bundle 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/ */
wemxo / encryption-bundle example snippets
namespace App;
classe MyService {
public function __construct(private EncryptionInterface $passwordEncryption, private EncryptionInterface $emailEncryption)
{
}
public function testEncryptPassword(string $text): string
{
return $this->passwordEncryption->encrypt($text);
}
public function testDecryptPassword(string $text): string
{
return $this->passwordEncryption->decrypt($text);
}
}