Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/devzwy/asktaopackagedatahelper

问道封包读写工具
https://github.com/devzwy/asktaopackagedatahelper

Last synced: 14 days ago
JSON representation

问道封包读写工具

Awesome Lists containing this project

README

        

# AsktaoPackageDataHelper
问道封包读写工具

封装常用工具类

新写项目直接套用即可 1.0.1

```

io.github.devzwy
asktao_data_helper
1.0.1

```

- 增加测试用例
```
src/test/java/io/github/devzwy/ExtKtTest.kt
```

```
/**
* 对明文的密码加密
*/
fun encryptGamePassword(account: String, password: String) =
Md5Utils.hash("${account}${Md5Utils.hash(password).uppercase()}20070201").uppercase()

/**
* 计算账号表签名
* [account] 传入明文账号
* [encryptPassword] 加密后的密码
* [privilege] 权限
* [goldCoin] 金元宝数量
* [silverCoin] 银元宝数量
*/
fun getAccountCheckSum(account: String, encryptPassword: String, privilege: Long, goldCoin: Long, silverCoin: Long) = Md5Utils.hash(
"${account}${encryptPassword}${toHexStr(privilege)}${toHexStr(goldCoin)}${
toHexStr(silverCoin)
}ABCDEF"
).uppercase()
```