| 325 | } |
| 326 | |
| 327 | async function MD5MD5(text) { |
| 328 | const encoder = new TextEncoder(); |
| 329 | |
| 330 | const firstPass = await crypto.subtle.digest('MD5', encoder.encode(text)); |
| 331 | const firstPassArray = Array.from(new Uint8Array(firstPass)); |
| 332 | const firstHex = firstPassArray.map(b => b.toString(16).padStart(2, '0')).join(''); |
| 333 | |
| 334 | const secondPass = await crypto.subtle.digest('MD5', encoder.encode(firstHex.slice(7, 27))); |
| 335 | const secondPassArray = Array.from(new Uint8Array(secondPass)); |
| 336 | const secondHex = secondPassArray.map(b => b.toString(16).padStart(2, '0')).join(''); |
| 337 | |
| 338 | return secondHex.toLowerCase(); |
| 339 | } |
| 340 | |
| 341 | function revertFakeInfo(content, userID, hostName) { |
| 342 | content = content.replace(new RegExp(fakeUserID, 'g'), userID).replace(new RegExp(fakeHostName, 'g'), hostName); |