Commit 63e7d5ac authored by duanjinfei's avatar duanjinfei

change sign

parent 7a1ea28c
......@@ -3,6 +3,7 @@ package controllers
import (
"bytes"
"crypto/ecdsa"
"crypto/rand"
"encoding/json"
"github.com/astaxie/beego"
"github.com/ethereum/go-ethereum/common"
......@@ -27,7 +28,7 @@ func (c *LLMController) GetContainerSign() {
signPrv := beego.AppConfig.String("sign_prv")
bridgePrv := stringToPrivateKey(signPrv)
hash := crypto.Keccak256Hash(bytes.NewBufferString(signData.TaskId).Bytes())
signature, err := ecdsa.SignASN1(nil, bridgePrv, hash.Bytes())
signature, err := ecdsa.SignASN1(rand.Reader, bridgePrv, hash.Bytes())
if err != nil {
return
}
......
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