fn Uint(comptime max_bits: comptime_int) type
[src]
An unsigned big integer with a fixed maximum size (max_bits
), suitable for cryptographic operations. Unless side-channels mitigations are explicitly disabled, operations are designed to be constant-time.
Functions
fn fromBytes(bytes: []const u8, comptime endian: builtin.Endian) OverflowError!Self
Creates a new big integer from a byte array.
fn fromPrimitive(comptime T: type, x_: T) OverflowError!Self
Creates a new big integer from a primitive type. This function may not run in c…
Creates a new big integer from a primitive type. This function may not run in constant time.
fn subWithOverflow(x: *Self, y: Self) u1
Subtracts
y
fromx
, and returnstrue
if the operation overflowed.fn toBytes(self: Self, bytes: []u8, comptime endian: builtin.Endian) OverflowError!void
Encodes a big integer into a byte array.
fn toPrimitive(self: Self, comptime T: type) OverflowError!T
Converts a big integer to a primitive type. This function may not run in consta…
Converts a big integer to a primitive type. This function may not run in constant time.