dream-common 1.1.44 → 1.1.45
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,9 @@ 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("hashData: " + hashData);
|
|
57
|
+
console.log("keyHex: " + keyHex);
|
|
58
|
+
console.log("ivHex: " + ivHex);
|
|
57
59
|
// 4. 序列化业务数据
|
|
58
60
|
const dataJson = typeof request.data === 'string' ? request.data : JSON.stringify(request.data);
|
|
59
61
|
|
|
@@ -109,7 +111,9 @@ export function decryptSecureData(request, privateKey, useBase64 = true) {
|
|
|
109
111
|
const hashData = sm3(signValue) // 杂凑
|
|
110
112
|
const keyHex = md5_32(signValue + hashData); // 32 hex → 16 bytes
|
|
111
113
|
const ivHex = md5_32(signSource + keyHex + hashData); // 32 hex → 16 bytes
|
|
112
|
-
|
|
114
|
+
console.log("sm3: " + hashData);
|
|
115
|
+
console.log("keyHex: " + keyHex);
|
|
116
|
+
console.log("ivHex: " + ivHex);
|
|
113
117
|
// 3. 处理 encData(base64 → hex)
|
|
114
118
|
|
|
115
119
|
const encDataHex = useBase64 ? base64ToHex(request.encData) : request.encData;
|