コード例 #1
0
 /**
  * @param CacheItemPoolInterface $decorated
  * @param string|resource $certificate
  * @param string $key
  * @param string|null $passPhrase
  * @param string $cipher
  *
  * @throws \Psr\Cache\InvalidArgumentException
  */
 public function __construct(CacheItemPoolInterface $decorated, $certificate, $key, $passPhrase = null, $cipher = 'aes-256-cbc')
 {
     parent::__construct($decorated);
     $this->cipher = $cipher;
     $this->certificate = $certificate;
     $this->key = $key;
     $this->passPhrase = $passPhrase;
 }
コード例 #2
0
 public function __construct(CacheItemPoolInterface $decorated, $password, $cipher = Iron\Iron::DEFAULT_ENCRYPTION_METHOD)
 {
     if (!class_exists(Iron\Iron::class)) {
         // @codeCoverageIgnoreStart
         throw new \RuntimeException('You must install' . ' jsq/iron-php to use the Iron decorator.');
         // @codeCoverageIgnoreEnd
     }
     parent::__construct($decorated);
     $this->decorated = $decorated;
     $this->password = Iron\normalize_password($password);
     $this->cipher = $cipher;
 }
コード例 #3
0
 /**
  * @param CacheItemPoolInterface $decorated
  * @param string $password
  * @param string $cipher
  */
 public function __construct(CacheItemPoolInterface $decorated, $password, $cipher = 'aes-256-cbc')
 {
     parent::__construct($decorated);
     $this->password = $password;
     $this->cipher = $cipher;
 }