Make NewFieldVal only avilable to the test package.

Since the function was only exported for use by the test package (and was
commented as such), just move it into the internal_test.go file so it is
only available when the tests run.
This commit is contained in:
Dave Collins 2013-12-20 19:19:02 -06:00
parent ac7e4de201
commit 85ac6b06f7
2 changed files with 6 additions and 7 deletions

View file

@ -1261,10 +1261,3 @@ func (f *fieldVal) Inverse() *fieldVal {
f.Square().Square().Square().Square().Square() // f = a^(2^256 - 4294968320)
return f.Mul(&a45) // f = a^(2^256 - 4294968275) = a^(p-2)
}
// NewFieldVal returns a new field value set to 0. Callers of this package
// don't need to work with field values directly. This is provided for testing
// purposes.
func NewFieldVal() *fieldVal {
return new(fieldVal)
}

View file

@ -63,3 +63,9 @@ func (curve *KoblitzCurve) TstAddJacobian(x1, y1, z1, x2, y2, z2, x3, y3, z3 *fi
func (curve *KoblitzCurve) TstDoubleJacobian(x1, y1, z1, x3, y3, z3 *fieldVal) {
curve.doubleJacobian(x1, y1, z1, x3, y3, z3)
}
// NewFieldVal returns a new field value set to 0. This is only available to
// the test package.
func NewFieldVal() *fieldVal {
return new(fieldVal)
}