2019-11-15 10:32:40 +00:00
|
|
|
package consensus
|
|
|
|
|
|
|
|
import (
|
2024-03-21 20:38:24 +00:00
|
|
|
"github.com/nspcc-dev/dbft"
|
2020-03-03 14:21:42 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
2019-11-15 10:32:40 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// privateKey is a wrapper around keys.PrivateKey
|
2022-04-20 18:30:09 +00:00
|
|
|
// which implements the crypto.PrivateKey interface.
|
2019-11-15 10:32:40 +00:00
|
|
|
type privateKey struct {
|
|
|
|
*keys.PrivateKey
|
|
|
|
}
|
|
|
|
|
2024-03-21 20:38:24 +00:00
|
|
|
var _ dbft.PrivateKey = &privateKey{}
|
|
|
|
|
2022-04-20 18:30:09 +00:00
|
|
|
// Sign implements the dbft's crypto.PrivateKey interface.
|
2020-01-16 15:30:16 +00:00
|
|
|
func (p *privateKey) Sign(data []byte) ([]byte, error) {
|
|
|
|
return p.PrivateKey.Sign(data), nil
|
|
|
|
}
|