public static function base64Decode($data, $url = true)
    {
        if ($url) {
            return base64_decode(strtr($data, '-_', '+/'));
        } else {
            return base64_decode($data);
        }
    }