將部分依賴存放本地, 添加針對移動端的報錯提示, 修正 CryptoES 的導出以及 Utf8 的引用, 忽略編譯靜態庫文件

This commit is contained in:
CrescentLeaf
2025-09-06 22:09:33 +08:00
parent 3c02b55a9b
commit d0c9465498
44 changed files with 6251 additions and 14 deletions

View File

@@ -0,0 +1,22 @@
import { Hex } from "./core.mjs";
import { CipherParams } from "./cipher-core.mjs";
//#region src/format-hex.ts
/**
* Hex formatter for cipher params.
* Converts cipher params to/from hexadecimal strings.
*/
const HexFormatter = {
stringify(cipherParams) {
if (!cipherParams.ciphertext) throw new Error("Ciphertext is required");
return cipherParams.ciphertext.toString(Hex);
},
parse(input) {
const ciphertext = Hex.parse(input);
return CipherParams.create({ ciphertext });
}
};
//#endregion
export { HexFormatter };
//# sourceMappingURL=format-hex.mjs.map