From 85ac6b06f7fe8a68b009363163413c2d81423cec Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 20 Dec 2013 19:19:02 -0600 Subject: [PATCH] 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. --- field.go | 7 ------- internal_test.go | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/field.go b/field.go index ac123e9e..79a72562 100644 --- a/field.go +++ b/field.go @@ -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) -} diff --git a/internal_test.go b/internal_test.go index c388225b..bd7be965 100644 --- a/internal_test.go +++ b/internal_test.go @@ -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) +}