Skip to content

Commit fc2f0cf

Browse files
committed
scheme level private key Bytes() methods
1 parent dc02f69 commit fc2f0cf

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

minpk/minpk.go

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ func (priv *PrivateKey) Equal(x crypto.PrivateKey) bool {
9898
return false
9999
}
100100

101+
func (priv *PrivateKey) Bytes() []byte {
102+
return (*blst.Scalar)(priv).Bytes()
103+
}
104+
101105
type PublicKey blst.P1Affine
102106

103107
func PublicKeyFromBytes(data []byte) (*PublicKey, error) {

minsig/minsig.go

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ func (priv *PrivateKey) Equal(x crypto.PrivateKey) bool {
9898
return false
9999
}
100100

101+
func (priv *PrivateKey) Bytes() []byte {
102+
return (*blst.Scalar)(priv).Bytes()
103+
}
104+
101105
type PublicKey blst.P2Affine
102106

103107
func PublicKeyFromBytes(data []byte) (*PublicKey, error) {

0 commit comments

Comments
 (0)