File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,11 +36,7 @@ fn (s State) to_bytes() []u8 {
3636 for y in 0 .. 5 {
3737 for x in 0 .. 5 {
3838 unsafe {
39- $if little_endian {
40- binary.little_endian_put_u64_at (mut byte_array, s.a[x][y], index)
41- } $else {
42- binary.big_endian_put_u64_at (mut byte_array, s.a[x][y], index)
43- }
39+ binary.little_endian_put_u64_at (mut byte_array, s.a[x][y], index)
4440 }
4541 index + = 8
4642 }
@@ -61,11 +57,7 @@ fn (mut s State) from_bytes(byte_array []u8) {
6157
6258 for y in 0 .. 5 {
6359 for x in 0 .. 5 {
64- $if little_endian {
65- s.a[x][y] = binary.little_endian_u64_at (byte_array, index)
66- } $else {
67- s.a[x][y] = binary.big_endian_u64_at (byte_array, index)
68- }
60+ s.a[x][y] = binary.little_endian_u64_at (byte_array, index)
6961 index + = 8
7062 }
7163 }
@@ -87,11 +79,7 @@ fn (mut s State) xor_bytes(byte_array []u8, rate int) {
8779
8880 for y in 0 .. 5 {
8981 for x in 0 .. 5 {
90- $if little_endian {
91- s.a[x][y] ^= binary.little_endian_u64_at (byte_array, index)
92- } $else {
93- s.a[x][y] ^= binary.big_endian_u64_at (byte_array, index)
94- }
82+ s.a[x][y] ^= binary.little_endian_u64_at (byte_array, index)
9583 index + = 8
9684
9785 if index > = rate {
You can’t perform that action at this time.
0 commit comments