fix decrypt

This commit is contained in:
iLay
2024-12-06 20:44:05 +08:00
parent 5c7cd86333
commit 2d017b0178
6 changed files with 77 additions and 71 deletions

View File

@ -1,6 +1,6 @@
import { md5 } from "js-md5";
import crypto from "crypto-js";
import pkg from "crypto-js";
const crypto = pkg;
const decrypt = function (ciphertext: string, iv: string, t: number): string {
try {
const key = generateKey(t);
@ -59,7 +59,6 @@ const generateKey = function (t: number): string {
const keyArray = concatenatedParams.split("");
const hashedKey = h(keyArray, t);
console.log(md5(hashedKey));
return md5(hashedKey);
};