From 6df745f1a06b1215235059ad1abff134e694aa83 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 20 Sep 2026 13:18:10 +0200 Subject: [PATCH] Add comments for the new functions --- lib/std/crypto/ff.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/std/crypto/ff.zig b/lib/std/crypto/ff.zig index 9192dc2179d4d7a14c30c892c331df248038517c..4e599b67c48fff0e8f7241e821398ce36b2972e8 100644 --- a/lib/std/crypto/ff.zig +++ b/lib/std/crypto/ff.zig @@ -424,6 +424,7 @@ pub fn Modulus(comptime max_bits: comptime_int) type { return self.limbs_count() * t_bits - self.leading; } + /// Returns the encoded length, in bytes. pub fn encodedLen(self: Self) usize { return @divCeil(self.bits(), 8); } @@ -491,6 +492,7 @@ pub fn Modulus(comptime max_bits: comptime_int) type { return self.v.toBytes(bytes, endian); } + /// Returns the modulus as an integer pub fn toUint(self: Self) FeUint { return self.v; } -- 2.54.0