/** * * @see \JWX\JWE\KeyManagementAlgorithm::headerParameters() * @return JWTParameter[] */ public function headerParameters() { return array_merge(parent::headerParameters(), array(AlgorithmParameter::fromAlgorithm($this), InitializationVectorParameter::fromString($this->_iv))); }
/** * Decrypt content using given JWK. * * Key management and content encryption algorithms are determined from the * header. * * @param JWK $jwk JSON Web Key * @throws \RuntimeException If algorithm initialization fails * @return string Plaintext payload */ public function decryptWithJWK(JWK $jwk) { $header = $this->header(); $key_algo = KeyManagementAlgorithm::fromJWK($jwk, $header); $enc_algo = EncryptionAlgorithmFactory::algoByHeader($header); return $this->decrypt($key_algo, $enc_algo); }
/** * * @see \JWX\JWE\KeyManagementAlgorithm::headerParameters() * @return JWTParameter[] */ public function headerParameters() { return array_merge(parent::headerParameters(), array(AlgorithmParameter::fromAlgorithm($this))); }
/** * * @see \JWX\JWE\KeyManagementAlgorithm::headerParameters() * @return JWTParameter[] */ public function headerParameters() { return array_merge(parent::headerParameters(), array(AlgorithmParameter::fromAlgorithm($this), PBES2SaltInputParameter::fromString($this->_saltInput), new PBES2CountParameter($this->_count))); }