Commit f8d7992e authored by duanjinfei's avatar duanjinfei

change sign power

parent bca90541
......@@ -3,7 +3,6 @@ package controllers
import (
"bytes"
"crypto/ecdsa"
"crypto/rand"
"encoding/json"
"github.com/astaxie/beego"
"github.com/ethereum/go-ethereum/common"
......@@ -34,7 +33,7 @@ func (c *LLMController) GetContainerSign() {
reqHash := crypto.Keccak256Hash(signData.TaskParam)
respHash := crypto.Keccak256Hash(signData.TaskResult)
signHash := crypto.Keccak256Hash(bytes.NewBufferString(signData.TaskId).Bytes(), reqHash.Bytes(), respHash.Bytes())
signature, err := ecdsa.SignASN1(rand.Reader, bridgePrv, signHash.Bytes())
signature, err := crypto.Sign(signHash.Bytes(), bridgePrv)
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