Commit 8456f2d8 authored by jiangpeng's avatar jiangpeng Committed by vipwzw

mod:update chain33

parent 84435b3c
......@@ -197,14 +197,14 @@ func (privKey PrivKeyBLS) Bytes() []byte {
}
// Sign create signature
func (privKey PrivKeyBLS) Sign(msg []byte, _ ...interface{}) crypto.Signature {
func (privKey PrivKeyBLS) Sign(msg []byte) crypto.Signature {
priv := g1pubs.DeserializeSecretKey(privKey)
sig := g1pubs.Sign(msg, priv)
return SignatureBLS(sig.Serialize())
}
// PubKey convert to public key
func (privKey PrivKeyBLS) PubKey(_ ...interface{}) crypto.PubKey {
func (privKey PrivKeyBLS) PubKey() crypto.PubKey {
priv := g1pubs.DeserializeSecretKey(privKey)
return PubKeyBLS(g1pubs.PrivToPub(priv).Serialize())
}
......
......@@ -64,11 +64,11 @@ func (mock *privKeyMock) Bytes() []byte {
return formatByte32([]byte("1234"))
}
func (mock *privKeyMock) Sign(msg []byte, _ ...interface{}) crypto.Signature {
func (mock *privKeyMock) Sign(msg []byte) crypto.Signature {
return &signatureMock{}
}
func (mock *privKeyMock) PubKey(_ ...interface{}) crypto.PubKey {
func (mock *privKeyMock) PubKey() crypto.PubKey {
return &pubKeyMock{}
}
......
......@@ -22,7 +22,7 @@ func (privKey PrivKeyPrivacy) Bytes() []byte {
}
// Sign signature trasaction
func (privKey PrivKeyPrivacy) Sign(msg []byte, _ ...interface{}) crypto.Signature {
func (privKey PrivKeyPrivacy) Sign(msg []byte) crypto.Signature {
temp := new([64]byte)
randomScalar := new([32]byte)
......@@ -51,7 +51,7 @@ func (privKey PrivKeyPrivacy) Sign(msg []byte, _ ...interface{}) crypto.Signatur
}
// PubKey get public key
func (privKey PrivKeyPrivacy) PubKey(_ ...interface{}) crypto.PubKey {
func (privKey PrivKeyPrivacy) PubKey() crypto.PubKey {
var pubKeyPrivacy PubKeyPrivacy
......
......@@ -64,7 +64,7 @@ func (privkey *RingSignPrivateKey) Bytes() []byte {
}
// Sign signature trasaction
func (privkey *RingSignPrivateKey) Sign(msg []byte, _ ...interface{}) crypto.Signature {
func (privkey *RingSignPrivateKey) Sign(msg []byte) crypto.Signature {
emptySign := &RingSignature{}
if len(msg) <= 0 {
return emptySign
......@@ -115,7 +115,7 @@ func (privkey *RingSignPrivateKey) Sign(msg []byte, _ ...interface{}) crypto.Sig
}
// PubKey convert to public key
func (privkey *RingSignPrivateKey) PubKey(_ ...interface{}) crypto.PubKey {
func (privkey *RingSignPrivateKey) PubKey() crypto.PubKey {
publicKey := new(RingSignPublicKey)
addr32 := (*[KeyLen32]byte)(unsafe.Pointer(&privkey.key))
addr64 := (*[privateKeyLen]byte)(unsafe.Pointer(&privkey.key))
......
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