createRecipient() public static méthode

public static createRecipient ( Jose\Object\JWKInterface $recipient_key, array $headers = [] )
$recipient_key Jose\Object\JWKInterface
$headers array
Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function addRecipientInformation(JWKInterface $recipient_key, $recipient_headers = [])
 {
     Assertion::true(null === $this->getCiphertext(), 'The JWE is encrypted. No additional recipient allowed.');
     $jwe = clone $this;
     $jwe->recipients[] = Recipient::createRecipient($recipient_key, $recipient_headers);
     return $jwe;
 }