update naming style

This commit is contained in:
weiweiw 2024-07-08 09:55:01 +08:00
parent d408815f8c
commit aa9691b85b
1 changed files with 4 additions and 4 deletions

View File

@ -6,19 +6,19 @@ const cbc_iv = CryptoJS.enc.Utf8.parse('1234567812345678')
* 默认参数需要加密 * 默认参数需要加密
* @type {boolean} * @type {boolean}
*/ */
const jia_mi=true; const encryptEnabled=true;
/** /**
* 默认后台会自动加密 * 默认后台会自动加密
* @type {boolean} * @type {boolean}
*/ */
const jie_mi=true; const decryptEnabled=true;
/** /**
* 加密 * 加密
* @param word * @param word
* @returns {string} * @returns {string}
*/ */
export const encryptCBC = function(word) { export const encryptCBC = function(word) {
if(!jia_mi){ if(!encryptEnabled){
return word; return word;
} }
const srcs = CryptoJS.enc.Utf8.parse(word) const srcs = CryptoJS.enc.Utf8.parse(word)
@ -35,7 +35,7 @@ export const encryptCBC = function(word) {
* @returns {*} * @returns {*}
*/ */
export const decryptCBC = function(word) { export const decryptCBC = function(word) {
if(!jie_mi){ if(!decryptEnabled){
return word; return word;
} }
const encrypted = CryptoJS.AES.decrypt(word, cbc_key, { const encrypted = CryptoJS.AES.decrypt(word, cbc_key, {