protected static function initializeState(string $key): array
    {
        $s = \range(0, 255);
        $j = 0;
        foreach (\range(0, 255) as $i) {
            $j = ($j + $s[$i] + \ord($key[$i % Str::strlen($key)])) % 256;
            $x = $s[$i];
            $s[$i] = $s[$j];
            $s[$j] = $x;
        }
        
        return $s;
    }