Commit ae529f43 by dliangx

加密编码

parent a7e90556
......@@ -84,7 +84,7 @@ func EncryptAndSign[T any](resp HttpBodyResp[T]) (CryptHttpBodyResp, error) {
return cresp, err
}
ciphertext, err := publicKey.EncryptAsn1(body, rand.Reader)
ciphertext, err := sm2.Encrypt(&publicKey, body, rand.Reader, sm2.C1C3C2)
if err != nil {
log.Println(err)
return cresp, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment