encrypt() public méthode

Encrypts $value with the defined settings
public encrypt ( string $value ) : string
$value string The content to encrypt
Résultat string The encrypted content
 /**
  * Ensures that the filter allows de/encryption with compression
  *
  * @return void
  */
 public function testEncryptionWithDecryptionAndCompressionMcrypt()
 {
     if (!extension_loaded('bz2')) {
         $this->markTestSkipped('This adapter needs the bz2 extension');
     }
     $filter = new Zend_Filter_Encrypt_Mcrypt(array('key' => 'testkey'));
     $filter->setVector('testvect');
     $filter->setCompression('bz2');
     $output = $filter->encrypt('teststring');
     $this->assertNotEquals('teststring', $output);
     $input = $filter->decrypt($output);
     $this->assertEquals('teststring', trim($input));
 }