Jose\Behaviour\EncrypterTrait::findKeyEncryptionAlgorithm PHP Метод

findKeyEncryptionAlgorithm() приватный Метод

private findKeyEncryptionAlgorithm ( array $complete_headers ) : Jose\Algorithm\KeyEncryptionAlgorithmInterface
$complete_headers array
Результат Jose\Algorithm\KeyEncryptionAlgorithmInterface
    private function findKeyEncryptionAlgorithm(array $complete_headers)
    {
        Assertion::keyExists($complete_headers, 'alg', 'Parameter "alg" is missing.');
        $key_encryption_algorithm = $this->getJWAManager()->getAlgorithm($complete_headers['alg']);
        Assertion::isInstanceOf($key_encryption_algorithm, Algorithm\KeyEncryptionAlgorithmInterface::class, sprintf('The key encryption algorithm "%s" is not supported or not a key encryption algorithm instance.', $complete_headers['alg']));
        return $key_encryption_algorithm;
    }