export function decrypt(encryptText, encryptKey) {
if (!encryptKey) return ''
const g = useGlobalStore()
const encrypt = new JSEncrypt()
encrypt.setPrivateKey(g.privateKey)
const key = CryptoJS?.enc.Utf8.parse(encrypt.decrypt(encryptKey))
const decrypt = CryptoJS?.AES.decrypt(encryptText, key, { mode: CryptoJS?.mode.ECB, padding: CryptoJS?.pad.Pkcs7 })
return CryptoJS?.enc.Utf8.stringify(decrypt).toString() || ''
}
请问这个解密什么意思啊
MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAOlwJqhgSLyiOHpjf9VlwzCg+9PC4By3/VLTxeZK+nfugROXP0kBwK/amjRb3TRnzjpYrn6bcdgVHeJ460StLrH+00J46DlVsGU/0iGU+rxkMoJ0QYWtygMdHm7Gg5I9Tz/djVkNKGhKshzkAo53LumTXJriHz1IdE9+xKpBVH8jAgMBAAECgYAB7VAUYb8X94rZz8p1W4Kx+xI5HEm3Uvl/XooqrYHFza05GS2Hj8EkcnyFZCC+VwEH0EWYe/YDn6EAhpkClx9kirltOSPsaM1yIzFWoJaSWIKFjPp0XDpIXVdxaHKgUbN3/+xFS7IosusHTZJyDU1Sz0ciivXxFaU0KeQOYyuKwQJBAPqyePmayNIw5l4jzlaysRAxj0LhXhPs3rDeT0+tE9bk2hQymfHDsLZ2aHazGGF515hQtqbSY6wjXpH+M21LJOECQQDuYDhuMq4otmo7XQUzTcD/XTHkPeyaCGVtwtgQI0MYcDezdZ2GmBvcScvNfRDwnsbuS9urOAIHH1iCrMejVKCDAkEAn8FJrC4B2UgGFWmV3NPEV8BtPb5l+CaTBny0Z96wbNmrSwGv7ku4+Z1dFn8sgzlktRCCRK5/i7uCUWB/Hx+qoQJAFKUovgKNquEBmlqYFLVrPbKom4fxcfXAMx1o8RzctsUhTd2l4v5Ri2aozAdE7FIUEJdpUw7qvgss80Rblf3CWQJBAKwEFlvcNlwCD+gvEihHwUa0TNkknbApQ9iZ9YwSpTAS7/C6BD28U7XPY7GMkkxzOxHXpizkPrICZQnuw9BZjDY=
这个是私钥
HUHzF52q5vtQCWXovaKGrW81JTyVAdrySvzfxwS8ab5aGcCD84gLtNDx3IDlPjWVD1ZVuYZCXJtqGUE7zQnRFpEtbvt0fx1E1FxitVsIA/IBrqdbCv0C1T2Jzl9v3ZarQ7uFnGH71m6kMUXrLcSL1ShlhdxKqLWlO2gBiawf5Xc=
这个是返回的加密数据,怎么变成明文呢
[backcolor=rgba(211, 211, 211, 0.86)]Text.
|