add the unit-test

This commit is contained in:
Cool Developer
2022-03-14 07:01:56 -04:00
parent 885e7c382e
commit 26bfd1051a
4 changed files with 90 additions and 76 deletions

View File

@@ -559,6 +559,12 @@ func (z Element) ToBigIntRegular(res *big.Int) *big.Int {
return z.ToBigInt(res)
}
// ToUint64Regular returns z as a uint64 in regular form
func (z Element) ToUint64Regular() uint64 {
z.FromMont()
return z[0]
}
// Bytes returns the regular (non montgomery) value
// of z as a big-endian byte array.
func (z *Element) Bytes() (res [Limbs * 8]byte) {