const API_KEY_MAP = {
	'yh-list': { // 隐患管理-列表
		id: 'gqyjglptthHiddenDanger',
		publicKey: '041a0802713d674bfc3db46293d83e2b3ebe99cd0ee9b5ae507a0aa07f41cd8bf1407d8c16fab3ceb28bfa233452417373ac0c7864e085895a27b4ebf14b2eb3b1',
		privateKey: '73ae80b0f34740ce795821bf4354f1621e4ab7d01d9f3f7fc7c05e52c527c528'
	},
	'yh-list-detail': { // 隐患管理-修改
		id: 'gqyjglptupdate',
		publicKey: '04cc5dfef4a8f0bb28298d4b06d02d2c933791b09d4d746a3e4aa7119f4402b3eb3f0c5df31127e96cc46bf9675cad52b95e3af6d7345040a05c7d17ced8a80f8f',
		privateKey: '2152ba9b1a9c6526fab2e6f5985da1c36ecc9476fd4ab4b19a43206836d8e496'
	},
	'dw-list': { // 危险作业备案管理-查询
		id: 'gqyjglptpage',
		publicKey: '04f09896234db417d7dcf1d7e56d69101590106b08d6ae752c2f59c8041ef5a9d4cc8535a9487806f5ed23ad6e9a62a9e031f6eb5d0181d007e73c685b4127f098',
		privateKey: '0093df6762d7371cdc039ce5bc42d70ce411ea2c7cf6e9a269a3f4b974f30961f8'
	},
	'dw-list-detail': { // 危险作业备案管理-新增/修改
		id: 'gqyjglptcreate',
		publicKey: '043cbdee5e137b43241c72481f023f0c937b383586fdfdbf8dc012e6e1dc6e3ee1cdd5d6c48aef3453c4ca55eaae2d583e74eb6844254be0fe393dcaccb14af65f',
		privateKey: '2f6c6b20e29ba96d03ea6dbc5975484cf96f99fcb99caf2cde1556ca68a31138'
	},
	'notice-list': { // 通知公告-列表
		id: 'gqyjglptfindOwnTag',
		publicKey: '049ba9d80cb4284f6cc9f55935b3cd57cec034b5f242c390bf70d2a62ee917cf525b83d524eb700c68af330c9e5bcb82bd1101370318cdce19418a342fa31217ed',
		privateKey: '2152ba9b1a9c6526fab2e6f5985da1c36ecc9476fd4ab4b19a43206836d8e496'
	},
	'notice-list-detail': { // 通知公告-详情
		id: 'gqyjglptfindOwn',
		publicKey: '04f65369ca1f06c23dca1428414495078097aaeab5ff58561bcf307ecb5db5c81abe731e4428799217def11507053530193aaa165a51ece5356c3a661ec455386b',
		privateKey: '00a47e6d4a77bd16d3e508c6d27c8349bd32a93a6033b8a920c4d55f5f2517a661'
	},
	'law-lv': { // 法律法规-分类列表
		id: 'gqyjglptlawCategory',
		publicKey: '0408156c9416ad5a092907640183a3f0cf235f4fe651c9e96f89093b1db148ff66c89fe63d9eb1620243e3e96bb7900c87e5551b033d49a09ac4018599fa72dbad',
		privateKey: '00dbd58eb615663adf7d078c6532d0eff3f2713ea1fe85fc1ae132f9aa196a5bf0'
	},
	'law-list': { // 法律法规-根据分类查询列表
		id: 'gqyjglptthLaw',
		publicKey: '0458df2864b796fa483084190b0908c554eb848fd9117cb6dc88c7df21f07e2e8cf7face6b9a31afe56c6910a35308c5631491307f78c30ce90b399629597bcad9',
		privateKey: '00b3872079b70e21605edf2d5a18706cf075985a954551afd2f3970d4fc9756107'
	},
	'law-list-detail': { // 法律法规-详情
		id: 'gqyjglptfindLawDetailsMobile',
		publicKey: '04032817278e7ddf328535df4d0a9180f4006a757c8d62aabd07b89eb380c353ce6e9b5882dddd18673e2adeae840a1058321624898397bf1237240d8c5e2fdadd',
		privateKey: '5adadd253436c736bc5036bc1399b4110df4153ffd856a574774d0a5d165a7dd'
	},
}

// aes解密
function aes_Decrypt(word, key) {
  var key = CryptoJS.enc.Utf8.parse(key) //转为128bit
  var srcs = CryptoJS.enc.Hex.parse(word) //转为16进制
  var str = CryptoJS.enc.Base64.stringify(srcs) //变为Base64编码的字符串
  var decrypt = CryptoJS.AES.decrypt(str, key, {
    mode: CryptoJS.mode.ECB,
    spadding: CryptoJS.pad.Pkcs7
  })
  return decrypt.toString(CryptoJS.enc.Utf8)
}

// sm2解密,需要创建加密应用时的私钥
function sm2_Decrypt(word, key) {
  return SM.decrypt(word, key)
}