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; }