This commit is contained in:
Łukasz Magiera 2021-01-25 14:02:58 +01:00
parent 9b62e224d5
commit 6d368179e1

View File

@ -30,7 +30,7 @@ func (blsSigner) GenPrivate() ([]byte, error) {
}
// Note private keys seem to be serialized little-endian!
sk := ffi.PrivateKeyGenerateWithSeed(ikm)
return ([]byte)(sk[:]), nil
return sk[:], nil
}
func (blsSigner) ToPublic(priv []byte) ([]byte, error) {
@ -43,7 +43,7 @@ func (blsSigner) ToPublic(priv []byte) ([]byte, error) {
pubkey := ffi.PrivateKeyPublicKey(*sk)
return ([]byte)(pubkey[:]), nil
return pubkey[:], nil
}
func (blsSigner) Sign(p []byte, msg []byte) ([]byte, error) {
@ -56,7 +56,7 @@ func (blsSigner) Sign(p []byte, msg []byte) ([]byte, error) {
sig := ffi.PrivateKeySign(*sk, msg)
return ([]byte)(sig[:]), nil
return sig[:], nil
}
func (blsSigner) Verify(sig []byte, a address.Address, msg []byte) error {