update naming style
This commit is contained in:
parent
d408815f8c
commit
aa9691b85b
|
|
@ -6,19 +6,19 @@ const cbc_iv = CryptoJS.enc.Utf8.parse('1234567812345678')
|
|||
* 默认参数需要加密
|
||||
* @type {boolean}
|
||||
*/
|
||||
const jia_mi=true;
|
||||
const encryptEnabled=true;
|
||||
/**
|
||||
* 默认后台会自动加密
|
||||
* @type {boolean}
|
||||
*/
|
||||
const jie_mi=true;
|
||||
const decryptEnabled=true;
|
||||
/**
|
||||
* 加密
|
||||
* @param word
|
||||
* @returns {string}
|
||||
*/
|
||||
export const encryptCBC = function(word) {
|
||||
if(!jia_mi){
|
||||
if(!encryptEnabled){
|
||||
return word;
|
||||
}
|
||||
const srcs = CryptoJS.enc.Utf8.parse(word)
|
||||
|
|
@ -35,7 +35,7 @@ export const encryptCBC = function(word) {
|
|||
* @returns {*}
|
||||
*/
|
||||
export const decryptCBC = function(word) {
|
||||
if(!jie_mi){
|
||||
if(!decryptEnabled){
|
||||
return word;
|
||||
}
|
||||
const encrypted = CryptoJS.AES.decrypt(word, cbc_key, {
|
||||
|
|
|
|||
Loading…
Reference in New Issue