Jose\Object\Recipient::createRecipientFromLoadedJWE PHP Method

createRecipientFromLoadedJWE() public static method

public static createRecipientFromLoadedJWE ( array $headers, $encrypted_key )
$headers array
    public static function createRecipientFromLoadedJWE(array $headers, $encrypted_key)
    {
        $recipient = new self();
        $recipient->headers = $headers;
        $recipient->encrypted_key = $encrypted_key;
        return $recipient;
    }

Usage Example

示例#1
0
文件: JWE.php 项目: spomky-labs/jose
 /**
  * {@inheritdoc}
  */
 public function addRecipientWithEncryptedKey($encrypted_key, array $recipient_headers)
 {
     $jwe = clone $this;
     $jwe->recipients[] = Recipient::createRecipientFromLoadedJWE($recipient_headers, $encrypted_key);
     return $jwe;
 }
All Usage Examples Of Jose\Object\Recipient::createRecipientFromLoadedJWE