|
@@ -3,6 +3,27 @@ console.log(CryptoJS.HmacSHA1("Message", "Key"));
|
|
|
|
|
|
|
|
let crypto = {}
|
|
let crypto = {}
|
|
|
|
|
|
|
|
|
|
+const WHITE_LIST = [
|
|
|
|
|
+ '/yeepay',
|
|
|
|
|
+ '/put-file',
|
|
|
|
|
+ '/blade-test',
|
|
|
|
|
+ '/payment',
|
|
|
|
|
+ '/sms',
|
|
|
|
|
+ '/mall/yeepay/product/fee/modifyProductFeeNotify',
|
|
|
|
|
+ '/shop/yeepay/product/fee/modifyProductFeeNotify',
|
|
|
|
|
+ '/withdraw',
|
|
|
|
|
+ '/pressure_test/scanPay',
|
|
|
|
|
+ '/pressure_test/deCodeNotifyData',
|
|
|
|
|
+ '/ocr',
|
|
|
|
|
+ '/import-bank-type'
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
|
|
+crypto.isNotInWhiteList = (url) => {
|
|
|
|
|
+ return !WHITE_LIST.some(item => {
|
|
|
|
|
+ return url.indexOf(item) > 0
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
//前后端定义的密钥,AES使用16位
|
|
//前后端定义的密钥,AES使用16位
|
|
|
const CRYPTOJS_KEY = "uAY9ugkHQpvozZeA";
|
|
const CRYPTOJS_KEY = "uAY9ugkHQpvozZeA";
|
|
|
// 加密
|
|
// 加密
|