chore: localfied react, react-dom and crypto-es
This commit is contained in:
22
client/static/crypto-es@3.1.0/format-hex.mjs
Normal file
22
client/static/crypto-es@3.1.0/format-hex.mjs
Normal 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
|
||||
Reference in New Issue
Block a user