authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2026-09-20 13:18:10+02:00
committergravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2026-09-22 13:32:43+02:00
log6df745f1a06b1215235059ad1abff134e694aa83
tree07fe7cebad922fa8a36e34780d9e1c1217eac763
parent199a5a2700eeb8f3eaed36255fd3f0c0756f0935

Add comments for the new functions


1 files changed, 2 insertions(+), 0 deletions(-)

lib/std/crypto/ff.zig+2
...@@ -424,6 +424,7 @@ pub fn Modulus(comptime max_bits: comptime_int) type {...@@ -424,6 +424,7 @@ pub fn Modulus(comptime max_bits: comptime_int) type {
424 return self.limbs_count() * t_bits - self.leading;424 return self.limbs_count() * t_bits - self.leading;
425 }425 }
426426
427 /// Returns the encoded length, in bytes.
427 pub fn encodedLen(self: Self) usize {428 pub fn encodedLen(self: Self) usize {
428 return @divCeil(self.bits(), 8);429 return @divCeil(self.bits(), 8);
429 }430 }
...@@ -491,6 +492,7 @@ pub fn Modulus(comptime max_bits: comptime_int) type {...@@ -491,6 +492,7 @@ pub fn Modulus(comptime max_bits: comptime_int) type {
491 return self.v.toBytes(bytes, endian);492 return self.v.toBytes(bytes, endian);
492 }493 }
493494
495 /// Returns the modulus as an integer
494 pub fn toUint(self: Self) FeUint {496 pub fn toUint(self: Self) FeUint {
495 return self.v;497 return self.v;
496 }498 }