crypto/bn256/cloudfare: golint fixes

This commit is contained in:
Mike Kinney 2019-12-09 22:07:11 -08:00
parent 5b6527cefb
commit e6df8a55cc
2 changed files with 7 additions and 7 deletions

View file

@ -45,8 +45,8 @@ func RandomG1(r io.Reader) (*big.Int, *G1, error) {
return k, new(G1).ScalarBaseMult(k), nil
}
func (g *G1) String() string {
return "bn256.G1" + g.p.String()
func (e *G1) String() string {
return "bn256.G1" + e.p.String()
}
// ScalarBaseMult sets e to g*k where g is the generator of the group and then
@ -334,8 +334,8 @@ func Miller(g1 *G1, g2 *G2) *GT {
return &GT{miller(g2.p, g1.p)}
}
func (g *GT) String() string {
return "bn256.GT" + g.p.String()
func (e *GT) String() string {
return "bn256.GT" + e.p.String()
}
// ScalarMult sets e to a*k and then returns e.

View file

@ -110,7 +110,7 @@ func (e *gfP12) MulScalar(a *gfP12, b *gfP6) *gfP12 {
return e
}
func (c *gfP12) Exp(a *gfP12, power *big.Int) *gfP12 {
func (e *gfP12) Exp(a *gfP12, power *big.Int) *gfP12 {
sum := (&gfP12{}).SetOne()
t := &gfP12{}
@ -123,8 +123,8 @@ func (c *gfP12) Exp(a *gfP12, power *big.Int) *gfP12 {
}
}
c.Set(sum)
return c
e.Set(sum)
return e
}
func (e *gfP12) Square(a *gfP12) *gfP12 {