doc: update readme
This commit is contained in:
parent
95b58b45c1
commit
6e700df3b9
27
README.md
27
README.md
@ -1,5 +1,32 @@
|
|||||||
# JOOX-Crypto
|
# JOOX-Crypto
|
||||||
|
|
||||||
|
Joox 加密处理库。
|
||||||
|
|
||||||
|
支持的加密版本:
|
||||||
|
|
||||||
|
- `E!04` - 加密版本 v4
|
||||||
|
|
||||||
|
## 安装 & 使用 (Install & Usage)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm i --save @unlock-music-gh/joox-crypto
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
const jooxFactory = require('@unlock-music-gh/joox-crypto');
|
||||||
|
|
||||||
|
const data = new Uint8Array(...);
|
||||||
|
const decryptor = jooxFactory(data, '00000000000000000000000000000000');
|
||||||
|
if (!decryptor) throw new Error('不支持的加密方案或不是 joox 加密的文件。');
|
||||||
|
|
||||||
|
/** @type {Uint8Array[]} */
|
||||||
|
const decrypted = decryptor.decryptFile(data);
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## English
|
||||||
|
|
||||||
A package to decrypt joox encrypted file.
|
A package to decrypt joox encrypted file.
|
||||||
|
|
||||||
Supported varient:
|
Supported varient:
|
||||||
|
Loading…
Reference in New Issue
Block a user