You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import website from '@/config/website'; |
|
import smCrypto from 'sm-crypto'; |
|
|
|
/** |
|
* sm2 加密方法 |
|
* @param data |
|
* @returns {*} |
|
*/ |
|
export function encrypt(data) { |
|
try { |
|
return smCrypto.sm2.doEncrypt(data, website.oauth2.publicKey, 0); |
|
} catch { |
|
return ''; |
|
} |
|
}
|
|
|