From 6e700df3b9bf5c125ed5ac0469b4291a1aab935a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sun, 19 Dec 2021 21:02:17 +0000 Subject: [PATCH] doc: update readme --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 14f0038..3450108 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,32 @@ # 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. Supported varient: