dream-common 1.1.44 → 1.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,7 +53,10 @@ export function encryptSecureData(request = {}, privateKey, useBase64 = true) {
|
|
|
53
53
|
const hashData = sm3(signValue) // 杂凑
|
|
54
54
|
const keyHex = md5_32(signValue + hashData); // 32 hex → 16 bytes
|
|
55
55
|
const ivHex = md5_32(signSource + keyHex + hashData); // 32 hex → 16 bytes
|
|
56
|
-
|
|
56
|
+
console.log("signValue: " + signValue);
|
|
57
|
+
console.log("hashData: " + hashData);
|
|
58
|
+
console.log("keyHex: " + keyHex);
|
|
59
|
+
console.log("ivHex: " + ivHex);
|
|
57
60
|
// 4. 序列化业务数据
|
|
58
61
|
const dataJson = typeof request.data === 'string' ? request.data : JSON.stringify(request.data);
|
|
59
62
|
|
|
@@ -109,7 +112,9 @@ export function decryptSecureData(request, privateKey, useBase64 = true) {
|
|
|
109
112
|
const hashData = sm3(signValue) // 杂凑
|
|
110
113
|
const keyHex = md5_32(signValue + hashData); // 32 hex → 16 bytes
|
|
111
114
|
const ivHex = md5_32(signSource + keyHex + hashData); // 32 hex → 16 bytes
|
|
112
|
-
|
|
115
|
+
console.log("sm3: " + hashData);
|
|
116
|
+
console.log("keyHex: " + keyHex);
|
|
117
|
+
console.log("ivHex: " + ivHex);
|
|
113
118
|
// 3. 处理 encData(base64 → hex)
|
|
114
119
|
|
|
115
120
|
const encDataHex = useBase64 ? base64ToHex(request.encData) : request.encData;
|