Jose\Algorithm\KeyEncryption\AESKW::checkKey PHP Method

checkKey() protected method

protected checkKey ( Jose\Object\JWKInterface $key )
$key Jose\Object\JWKInterface
    protected function checkKey(JWKInterface $key)
    {
        Assertion::eq($key->get('kty'), 'oct', 'Wrong key type.');
        Assertion::true($key->has('k'), 'The key parameter "k" is missing.');
        Assertion::eq($this->getKeySize(), mb_strlen(Base64Url::decode($key->get('k')), '8bit'), 'The key size is not valid');
    }