Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devzwy/asktaopackagedatahelper
问道封包读写工具
https://github.com/devzwy/asktaopackagedatahelper
Last synced: 14 days ago
JSON representation
问道封包读写工具
- Host: GitHub
- URL: https://github.com/devzwy/asktaopackagedatahelper
- Owner: devzwy
- Created: 2023-01-04T06:40:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-12T01:35:21.000Z (over 1 year ago)
- Last Synced: 2024-10-08T21:43:17.836Z (about 1 month ago)
- Language: Kotlin
- Size: 9.77 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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()
```