From f1211c1b0749f74dcb9c5fdbf6998010c195685f Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Wed, 5 Oct 2022 17:29:38 -0400 Subject: [PATCH] fix: invalid bytes function --- rln/utils.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rln/utils.go b/rln/utils.go index f51a993..6b1d64f 100644 --- a/rln/utils.go +++ b/rln/utils.go @@ -25,12 +25,12 @@ func toMembershipKeyPairs(groupKeys [][]string) ([]MembershipKeyPair, error) { func Bytes32(b []byte) [32]byte { var result [32]byte - copy(result[:], b) + copy(result[32-len(b):], b) return result } -func Bytes256(b []byte) [256]byte { - var result [256]byte - copy(result[:], b) +func Bytes128(b []byte) [128]byte { + var result [128]byte + copy(result[128-len(b):], b) return result }