@@ -25,9 +25,9 @@ type G1Array []*math.G1
2525
2626// Bytes returns the serialization of the G1Array as a byte slice.
2727// It returns an error if any element cannot be marshaled.
28- func (a * G1Array ) Bytes () ([]byte , error ) {
29- raw := make ([][]byte , len ([]* math.G1 (* a )))
30- for i , e := range []* math.G1 (* a ) {
28+ func (a G1Array ) Bytes () ([]byte , error ) {
29+ raw := make ([][]byte , len ([]* math.G1 (a )))
30+ for i , e := range []* math.G1 (a ) {
3131 if e == nil {
3232 return nil , errors .Errorf ("failed to marshal array of G1" )
3333 }
@@ -39,14 +39,13 @@ func (a *G1Array) Bytes() ([]byte, error) {
3939// BytesTo writes the serialization of the G1Array into the provided buffer b
4040// and returns the extended slice. The provided buffer b is cleared before use.
4141// It returns an error if any element cannot be marshaled.
42- func (a * G1Array ) BytesTo (b []byte ) ([]byte , error ) {
43- raw := make ([][]byte , len ([]* math.G1 (* a )))
44- for i , e := range []* math.G1 (* a ) {
42+ func (a G1Array ) BytesTo (b []byte ) ([]byte , error ) {
43+ raw := make ([][]byte , len ([]* math.G1 (a )))
44+ for i , e := range []* math.G1 (a ) {
4545 if e == nil {
4646 return nil , errors .Errorf ("failed to marshal array of G1" )
4747 }
48- st := hex .EncodeToString (e .Bytes ())
49- raw [i ] = []byte (st )
48+ raw [i ] = e .Bytes ()
5049 }
5150 // clear the provided buffer and reuse its capacity
5251 if len (b ) != 0 {
0 commit comments