We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b471e15 commit cf9ca3aCopy full SHA for cf9ca3a
README.md
@@ -16,3 +16,19 @@ CookieCloud是一个向自架服务器同步Cookie的小工具,可以将电脑
16
cd api && yarn install && node app.js
17
```
18
默认端口 8088
19
+
20
+## Cookie解密算法
21
22
+1. md5(uuid+password) 取前16位作为key
23
+2. AES.decrypt(encrypted, the_key)
24
25
+```node
26
+function cookie_decrypt( uuid, encrypted, password )
27
+{
28
+ const CryptoJS = require('crypto-js');
29
+ const the_key = CryptoJS.MD5(uuid+'-'+password).toString().substring(0,16);
30
+ const decrypted = CryptoJS.AES.decrypt(encrypted, the_key).toString(CryptoJS.enc.Utf8);
31
+ const parsed = JSON.parse(decrypted);
32
+ return parsed;
33
+}
34
+```
0 commit comments