|
@@ -53,6 +53,7 @@ function getDecMethod(code: string) {
|
|
/** 对原始字符串进行加密 */
|
|
/** 对原始字符串进行加密 */
|
|
export function doEnc(rawStr: string, key: string) {
|
|
export function doEnc(rawStr: string, key: string) {
|
|
const salt = getSalt();
|
|
const salt = getSalt();
|
|
|
|
+ if (!salt) return rawStr;
|
|
|
|
|
|
const methods = salt.split("");
|
|
const methods = salt.split("");
|
|
|
|
|
|
@@ -68,6 +69,7 @@ export function doEnc(rawStr: string, key: string) {
|
|
/** 对加密字符串进行依次解密 */
|
|
/** 对加密字符串进行依次解密 */
|
|
export function doDec(rawStr: string, key: string) {
|
|
export function doDec(rawStr: string, key: string) {
|
|
const salt = getSalt();
|
|
const salt = getSalt();
|
|
|
|
+ if (!salt) return rawStr;
|
|
|
|
|
|
const methods = salt.split("");
|
|
const methods = salt.split("");
|
|
|
|
|