This commit is contained in:
kk
2026-07-08 18:00:33 +08:00
commit e66b4a3680
312 changed files with 54718 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
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 '';
}
}