public static function createOctKey(int $size, array $values = []): JWK
    {
        if (0 !== $size % 8) {
            throw new InvalidArgumentException('Invalid key size.');
        }
        $values = \array_merge(
            $values,
            [
                'kty' => 'oct',
                'k' => Base64Url::encode(\random_bytes($size / 8)),
            ]
        );

        return new JWK($values);
    }