decrypt() public method

Decrypts the given $string that was encrypted with the $key.
public decrypt ( string $string, string $key ) : string
$string string Encrypted string.
$key string Key used for encryption.
return string Decrypted string.
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);
 }