for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2015 Spomky-Labs
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace Jose;
/**
* Class JWE.
class JWE extends JWT implements JWEInterface
{
* @var string|null
private $ciphertext = null;
private $encrypted_key = null;
private $iv = null;
private $aad = null;
private $tag = null;
* {@inheritdoc}
public function getEncryptionAlgorithm()
return $this->getHeaderValue('enc');
}
public function getZip()
return $this->getHeaderValue('zip');
public function getCiphertext()
return $this->ciphertext;
public function withCiphertext($ciphertext)
$jwe = clone $this;
$jwe->ciphertext = $ciphertext;
return $jwe;
public function getEncryptedKey()
return $this->encrypted_key;
public function withEncryptedKey($encrypted_key)
$jwe->encrypted_key = $encrypted_key;
public function getAAD()
return $this->aad;
public function withAAD($aad)
$jwe->aad = $aad;
public function getIV()
return $this->iv;
public function withIV($iv)
$jwe->iv = $iv;
public function getTag()
return $this->tag;
public function withTag($tag)
$jwe->tag = $tag;