feat:登录
This commit is contained in:
1 parent
0088fe3509
commit
8cfe87e31e
8 files changed
+5048
-3914
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import * as CryptoJS from "crypto-js";
|
||||
|
||||
/**
|
||||
*加密处理
|
||||
*/
|
||||
export function encryption(src: string, keyWord: string) {
|
||||
const key = CryptoJS.enc.Utf8.parse(keyWord);
|
||||
// 加密
|
||||
var encrypted = CryptoJS.AES.encrypt(src, key, {
|
||||
iv: key,
|
||||
mode: CryptoJS.mode.CFB,
|
||||
padding: CryptoJS.pad.NoPadding,
|
||||
});
|
||||
return encrypted.toString();
|
||||
}
|
||||
Reference in new issue
Block a user