Giter Site home page Giter Site logo

eso_source's Introduction

亦搜IOS版

安装包获取:https://github.com/xiaohucode/eso_source/releases

规则导入链接:https://raw.githubusercontent.com/xiaohucode/eso_source/main/%E6%95%B4%E5%90%88%E8%A7%84%E5%88%99/EsoSource.json

eso_source

app作者开源地址:https://github.com/mabDc/eso

esoTools函数

  • 下列是异步函数,需要使用 await 或 then 获取返回值

esoTools.encode(type, body) //编码数据 type可以是'base64' 'gbk' 'utf8' 'md5'

esoTools.decode(type, body) //解码数据 type可以是'base64' 'gbk' 'utf8'

esoTools.AES_Encode (string, inkey, opt) //返回字典{'base16':x,'base64':x,'bytes':x}

esoTools.AES_Decode (string, inkey, opt) //string需提供base64格式数据 返回解密文本数据

esoTools.AES_EncodeCBC (string, inkey, iniv) // 返回值同AES_Encode,默认为PKCS7模式

esoTools.AES_DecodeCBC (string, inkey, iniv) // 同AES_Decode,默认为PKCS7模式

esoTools.AES_EncodeECB (string, inkey) //ECB模式加密返回值同AES_Encode

esoTools.AES_DecodeECB (string, inkey) //ECB模式解密

  • 下列函数不必使用await 或 then

esoTools.RSA_encrypt (string, key) //RSA公钥加密

esoTools.RSA_decrypt (string, key) //RSA私钥解密

esoTools.RSA_encryptWithPrivate (string, key) //RSA私钥加密

esoTools.RSA_decryptWithPublic (string, key) //RSA公钥解密

esoTools.md5Encode (str)

esoTools.base64Encode (str)

esoTools.base64Decode (str)

esoTools.sha1Encode (str)

esoTools.sha224Encode (str)

esoTools.sha256Encode (str)

esoTools.sha348Encode (str)

esoTools.sha512Encode (str)

esoTools.ripemd160Encode (str)

esoTools.AES例:

// enum AESMode {
//     cbc,
//     cfb64,
//     ctr,
//     ecb,
//     ofb64Gctr,
//     ofb64,
//     sic,
// };
let encodeStr = esoTools.AES_Encode("你好", "x;j/6olSp})&{ZJD", {
    mode: AESMode.cbc,
    padding: 'PKCS7',
    iv: "znbV%$JN5olCpt<c"
});
print(encodeStr);
print(encodeStr.base64);
print(encodeStr.base16);
print(encodeStr.bytes);
let res = esoTools.AES_Decode(encodeStr.base64, "x;j/6olSp})&{ZJD", {
    mode: AESMode.cbc,
    padding: 'PKCS7',
    iv: "znbV%$JN5olCpt<c"
});
print(res);

params规则

在设置moreKeys(更多键)后有效

params.pageIndex 等价于page 当前页码

params.tabIndex 分组索引

params.filters 筛选器

moreKeys(更多键)

用于一些筛选配置,必须提供JSON数据 格式为:object{isWrap,list[object{title,requestFilters[object{key, item[object{title,value}]}]}]}

object{
    isWrap,                         // bool型 筛选器是否为瀑布流布局,默认为true,false为横向滑动布局
    list[                           // list数组 多类型分组数组
        object{                     // 分组{n}
            title,                  // 分组标题名
            requestFilters[         // 筛选器数组,
                object{             // 筛选器{n}
                    key,            // key标识 用于在js里读取value  如此处key为'rank' js获取应为params.filters.rank
                    items[          // 项目数组 
                        object{     // 项目{n}
                            title,  // 筛选标签名字
                            value   // 数值
                        }
                    ] 
                }
            ]
        }
    ]
}
把这个JSON数据复制到JSON查看器里观察
{"list":[{"title":"电视剧","requestFilters":[{"items":[{"title":"全部","value":"/tv/index.html"},{"title":"国产剧","value":"/guochan/index.html"},{"title":"港台剧","value":"/tangtai/index.html"},{"title":"欧美剧","value":"/oumei/index.html"},{"title":"日韩剧","value":"/rihan/index.html"}],"key":"type","value":"/tv/index.html"}]},{"title":"电影","requestFilters":[{"items":[{"title":"全部","value":"/dy/index.html"},{"title":"动作片","value":"/dongzuo/index.html"},{"title":"爱情片","value":"/aiqing/index.html"},{"title":"科幻片","value":"/kehuan/index.html"},{"title":"恐怖片","value":"/kongbu/index.html"},{"title":"喜剧片","value":"/xiju/index.html"},{"title":"剧情片","value":"/juqing/index.html"},{"title":"在线直播","value":"/zaixianzhibo/index.html"}],"key":"type","value":"/dy/index.html"}]},{"title":"综艺","requestFilters":[{"items":[{"title":"全部","value":"/zy/index.html"}],"key":"type","value":"/zy/index.html"}]},{"title":"动漫","requestFilters":[{"items":[{"title":"全部","value":"/dm/index.html"}],"key":"type","value":"/dm/index.html"}]}]}

eso_source's People

Contributors

xiaohubase avatar xiaohucode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.