mirror of
https://github.com/codex-storage/nim-poseidon2.git
synced 2025-02-20 23:08:36 +00:00
Remove trailing whitespace
This commit is contained in:
parent
5220f372c1
commit
0cdbed1dc2
@ -36,7 +36,7 @@ proc internal_round(j: int; x, y, z: var F) =
|
||||
sbox(x)
|
||||
var s = x ; s += y ; s += z
|
||||
double(z)
|
||||
x += s
|
||||
x += s
|
||||
y += s
|
||||
z += s
|
||||
|
||||
@ -73,7 +73,7 @@ proc compress*(a, b : F) : F =
|
||||
perm_inplace(x, y, z)
|
||||
return x
|
||||
|
||||
proc merkle_root*(xs: openArray[F]) : F =
|
||||
proc merkle_root*(xs: openArray[F]) : F =
|
||||
let a = low(xs)
|
||||
let b = high(xs)
|
||||
let m = b-a+1
|
||||
@ -85,7 +85,7 @@ proc merkle_root*(xs: openArray[F]) : F =
|
||||
let halfn : int = m div 2
|
||||
let n : int = 2*halfn
|
||||
let is_odd : bool = (n != m)
|
||||
|
||||
|
||||
var ys : seq[F] = newSeq[F](halfn)
|
||||
|
||||
if not is_odd:
|
||||
@ -101,6 +101,6 @@ proc merkle_root*(xs: openArray[F]) : F =
|
||||
return merkle_root(ys)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -17,17 +17,17 @@ func getZero*() : F =
|
||||
setZero(z)
|
||||
return z
|
||||
|
||||
func toF*(a: int) : F =
|
||||
func toF*(a: int) : F =
|
||||
var y : F
|
||||
fromInt(y, a);
|
||||
return y
|
||||
|
||||
func hexToF*(s : string) : F =
|
||||
func hexToF*(s : string) : F =
|
||||
var y : F
|
||||
fromHex(y, s)
|
||||
return y
|
||||
|
||||
func arrayFromHex*[N]( inp: array[N, string]) : array[N, F] =
|
||||
func arrayFromHex*[N]( inp: array[N, string]) : array[N, F] =
|
||||
var tmp : array[N, F]
|
||||
for i in low(inp)..high(inp):
|
||||
tmp[i] = hexToF( inp[i] )
|
||||
|
Loading…
x
Reference in New Issue
Block a user