Ejemplo n.º 1
0
 /**
  * Set algorithm of the symmetric cipher
  *
  * @param  string $algo
  * @return BlockCipher
  * @throws Exception\InvalidArgumentException
  */
 public function setCipherAlgorithm($algo)
 {
     if (empty($this->cipher)) {
         throw new Exception\InvalidArgumentException('No symmetric cipher specified');
     }
     try {
         $this->cipher->setAlgorithm($algo);
     } catch (Symmetric\Exception\InvalidArgumentException $e) {
         throw new Exception\InvalidArgumentException($e->getMessage());
     }
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * Set algorithm of the symmetric cipher
  *
  * @param  string                             $algo
  */
 public function setCipherAlgorithm($algo)
 {
     $this->cipher->setAlgorithm($algo);
 }