Inheritance: implements Webiny\Component\Security\Token\CryptDrivers\CryptDriverInterface, use trait Webiny\Component\Crypt\CryptTrait
Example #1
0
 public function testEncryptDecrypt()
 {
     $crypt = new Crypt('Password');
     $encrypted = $crypt->encrypt('password', 'someSecuredKey12');
     $this->assertNotSame('password', $encrypted);
     $decrypted = $crypt->decrypt($encrypted, 'someSecuredKey12');
     $this->assertSame('password', $decrypted);
 }