chore: localfied react, react-dom and crypto-es

This commit is contained in:
CrescentLeaf
2025-09-06 23:28:50 +08:00
parent 22b8269c4b
commit b6140063c7
45 changed files with 26277 additions and 36 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