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