neo-go/pkg/consensus/crypto.go

20 lines
450 B
Go
Raw Normal View History

2019-11-15 10:32:40 +00:00
package consensus
import (
"github.com/nspcc-dev/dbft"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
2019-11-15 10:32:40 +00:00
)
// privateKey is a wrapper around keys.PrivateKey
// which implements the crypto.PrivateKey interface.
2019-11-15 10:32:40 +00:00
type privateKey struct {
*keys.PrivateKey
}
var _ dbft.PrivateKey = &privateKey{}
// Sign implements the dbft's crypto.PrivateKey interface.
func (p *privateKey) Sign(data []byte) ([]byte, error) {
return p.PrivateKey.Sign(data), nil
}