Add files via upload

This commit is contained in:
Jesse-Ma
2022-11-22 14:58:24 +08:00
committed by GitHub
parent 732907c3b6
commit 79c1831e6f
19 changed files with 638 additions and 796 deletions

View File

@@ -1,40 +1,13 @@
// import Jquery from "jquery";
import {aesEncrypt, md5} from "@/libs/secret";
// export function getSecretKey(key, password) {
// console.log("getSecretKey");
// let secretKey = '';
// Jquery.ajax({
// method: 'POST',
// url: '/note/' + key + "/secretKey",
// async: false,
// contentType: 'application/json',
// dataTeyp: 'json',
// data: JSON.stringify({'password': password}),
// success: function (data) {
// secretKey = data;
// },
// error: function () {
// alert('服务器链接异常 ');
// },
// });
// return secretKey;
// }
import { aesEncrypt, md5 } from "@/libs/secret";
export function getStoreKey(key) {
return md5(aesEncrypt(key, key));
return md5(key + key);
}
export function getSecretKey(cipher, password) {
if(!password){
password = '';
}
return md5(cipher + password);
export function getSecretKey(key, password) {
if (!password) {
password = key;
}
return md5(aesEncrypt(key, password));
}