Jose\Encrypter::getEncryptedKey PHP Method

getEncryptedKey() private method

private getEncryptedKey ( array $complete_headers, string $cek, Jose\Algorithm\KeyEncryptionAlgorithmInterface $key_encryption_algorithm, Jose\Algorithm\ContentEncryptionAlgorithmInterface $content_encryption_algorithm, array &$additional_headers, Jose\Object\JWKInterface $recipient_key ) : string | null
$complete_headers array
$cek string
$key_encryption_algorithm Jose\Algorithm\KeyEncryptionAlgorithmInterface
$content_encryption_algorithm Jose\Algorithm\ContentEncryptionAlgorithmInterface
$additional_headers array
$recipient_key Jose\Object\JWKInterface
return string | null
    private function getEncryptedKey(array $complete_headers, $cek, Algorithm\KeyEncryptionAlgorithmInterface $key_encryption_algorithm, Algorithm\ContentEncryptionAlgorithmInterface $content_encryption_algorithm, array &$additional_headers, Object\JWKInterface $recipient_key)
    {
        if ($key_encryption_algorithm instanceof Algorithm\KeyEncryption\KeyEncryptionInterface) {
            return $this->getEncryptedKeyFromKeyEncryptionAlgorithm($complete_headers, $cek, $key_encryption_algorithm, $recipient_key, $additional_headers);
        } elseif ($key_encryption_algorithm instanceof Algorithm\KeyEncryption\KeyWrappingInterface) {
            return $this->getEncryptedKeyFromKeyWrappingAlgorithm($complete_headers, $cek, $key_encryption_algorithm, $recipient_key, $additional_headers);
        } elseif ($key_encryption_algorithm instanceof Algorithm\KeyEncryption\KeyAgreementWrappingInterface) {
            return $this->getEncryptedKeyFromKeyAgreementAndKeyWrappingAlgorithm($complete_headers, $cek, $key_encryption_algorithm, $content_encryption_algorithm, $additional_headers, $recipient_key);
        }
    }