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 { WordArray } from "./core.mjs";
//#region src/pad-iso10126.ts
/**
* ISO 10126 padding strategy.
*/
const Iso10126 = {
pad(data, blockSize) {
const blockSizeBytes = blockSize * 4;
const nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
data.concat(WordArray.random(nPaddingBytes - 1)).concat(WordArray.create([nPaddingBytes << 24], 1));
},
unpad(data) {
const _data = data;
const nPaddingBytes = _data.words[_data.sigBytes - 1 >>> 2] & 255;
_data.sigBytes -= nPaddingBytes;
}
};
//#endregion
export { Iso10126 };
//# sourceMappingURL=pad-iso10126.mjs.map