fix: invalid bytes function

This commit is contained in:
Richard Ramos 2022-10-05 17:29:38 -04:00
parent 144ec288d9
commit f1211c1b07
No known key found for this signature in database
GPG Key ID: BD36D48BC9FFC88C

View File

@ -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
}