Commit f8d7992e authored by duanjinfei's avatar duanjinfei

change sign power

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