public static function bytes($n, &$method = null)
    {
        $bytes = self::php7Bytes($n);
        $method = 'php7';
        if (! isset($bytes)) {
            $bytes = self::mcryptBytes($n);
            $method = 'mcrypt';
        }
        if (! isset($bytes)) {
            $bytes = self::opensslBytes($n);
            $method = 'openssl';
        }
        if (! isset($bytes)) {
            $bytes = self::urandomBytes($n);
            $method = 'urandom';
        }
        if (! isset($bytes)) {
            $bytes = self::mtRandBytes($n);
            $method = 'mt_rand';
        }
        $l = Binary::length($bytes);
        if ($l < $n) {
            $bytes .= self::mtRandBytes($n - $l);
        }
        return $bytes;
    }