setCryptAlgorithm() public method

Sets the crypt algorithm (also known as cipher or cypher) that will be used for {@link encrypt} and {@link decrypt}.
public setCryptAlgorithm ( $value )
Esempio n. 1
0
 public function testEncryption()
 {
     $sec = new TSecurityManager();
     $sec->init(null);
     try {
         $sec->setCryptAlgorithm('NotExisting');
         $foo = $sec->encrypt('dummy');
         self::fail('Expected TNotSupportedException not thrown');
     } catch (TNotSupportedException $e) {
         self::assertEquals('NotExisting', $sec->getCryptAlgorithm());
     }
 }