8 lines
181 B
JavaScript
8 lines
181 B
JavaScript
|
|
import smcrypto from 'sm-crypto';
|
||
|
|
const SM2 = {
|
||
|
|
sm2Encrypt:function(text, publicKey) {
|
||
|
|
const sm2 = smcrypto.sm2;
|
||
|
|
return sm2.doEncrypt(text ,publicKey);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
export default SM2;
|