public static function createRecipientFromLoadedJWE(array $headers, $encrypted_key) { $recipient = new self(); $recipient->headers = $headers; $recipient->encrypted_key = $encrypted_key; return $recipient; }
/** * {@inheritdoc} */ public function addRecipientWithEncryptedKey($encrypted_key, array $recipient_headers) { $jwe = clone $this; $jwe->recipients[] = Recipient::createRecipientFromLoadedJWE($recipient_headers, $encrypted_key); return $jwe; }