Jose\Behaviour\EncrypterTrait::checkKeys PHP Method

checkKeys() private method

private checkKeys ( Jose\Algorithm\KeyEncryptionAlgorithmInterface $key_encryption_algorithm, Jose\Algorithm\ContentEncryptionAlgorithmInterface $content_encryption_algorithm, Jose\Object\JWKInterface $recipient_key )
$key_encryption_algorithm Jose\Algorithm\KeyEncryptionAlgorithmInterface
$content_encryption_algorithm Jose\Algorithm\ContentEncryptionAlgorithmInterface
$recipient_key Jose\Object\JWKInterface
    private function checkKeys(Algorithm\KeyEncryptionAlgorithmInterface $key_encryption_algorithm, Algorithm\ContentEncryptionAlgorithmInterface $content_encryption_algorithm, Object\JWKInterface $recipient_key)
    {
        $this->checkKeyUsage($recipient_key, 'encryption');
        if ('dir' !== $key_encryption_algorithm->getAlgorithmName()) {
            $this->checkKeyAlgorithm($recipient_key, $key_encryption_algorithm->getAlgorithmName());
        } else {
            $this->checkKeyAlgorithm($recipient_key, $content_encryption_algorithm->getAlgorithmName());
        }
    }