mirror of
https://github.com/naiyQAQ/fanqie-assistant.git
synced 2026-10-21 10:24:47 +00:00
feat: txt/epub download && new encrypted font decryption table
This commit is contained in:
1 parent
57f7a8ca8d
commit
7b10fada5d
30 files changed
+3044
-76
No files matched your search
@@ -59,10 +59,6 @@ export function hex(buffer: ArrayBuffer): string {
|
||||
return hexString;
|
||||
}
|
||||
|
||||
/**
|
||||
* PKCS#7 填充。注意 WebCrypto 的 AES-CBC 会自动补 PKCS#7,
|
||||
* 只有在需要手动分块(如 Simon/Speck)时才要调用本函数。
|
||||
*/
|
||||
export function pkcs7Pad(data: Uint8Array, blockSize = 16): Uint8Array<ArrayBuffer> {
|
||||
const padLength = blockSize - (data.length % blockSize);
|
||||
const padded = new Uint8Array(data.length + padLength);
|
||||
|
||||
Reference in new issue
Block a user