|
|
@@ -791,8 +791,13 @@ INTERFACE_EXPORT = (() => {
|
|
|
gongLGCSJ.children.push(gongLGCHZ);
|
|
|
|
|
|
// const md5Str = await md5(CRCvals.join(''));
|
|
|
+ for (let crcIdx = 0; crcIdx < CRCvals.length; crcIdx++) {
|
|
|
+ CRCvals[crcIdx] = CRCvals[crcIdx].replace(/ /g, '').replace(/\r/g, '').replace(/\n/g, '');
|
|
|
+ }
|
|
|
const md5Str = md5Ex(CRCvals.join(''));
|
|
|
- const gongCXX = new GongCXX(md5Str);
|
|
|
+ const binaryStr = hexToBinary(md5Str); // 转成二进制string
|
|
|
+ const finalMd5Str = window.btoa(binaryStr); // 还要做一次BASE64转换
|
|
|
+ const gongCXX = new GongCXX(finalMd5Str);
|
|
|
rootNode.children = [gongCXX, zhaoTBXX, gongLGCSJ];
|
|
|
|
|
|
const suffix = INTERFACE_CONFIG[areaKey]['fileSuffix'][exportKind];
|
|
|
@@ -1021,6 +1026,12 @@ INTERFACE_EXPORT = (() => {
|
|
|
return (md5_WordToHex(a) + md5_WordToHex(b) + md5_WordToHex(c) + md5_WordToHex(d)).toLowerCase();
|
|
|
}
|
|
|
|
|
|
+ function hexToBinary(hex) {
|
|
|
+ return hex.replace(/^(.{2})(.*)$/g, function(_, $1, $2) {
|
|
|
+ return String.fromCharCode(parseInt($1, 16)) + hexToBinary($2);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
return {
|
|
|
entry,
|
|
|
};
|