Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

setOne

The function setOne returns the field element one in the Montgomery domain.

Postconditions: eval (from_montgomery out1) mod m = 1 mod m 0 ≤ eval out1 < m

p384_64.setOne
pub fn setOne(out1: *MontgomeryDomainFieldElement) void

File

Code

pub fn setOne(out1: *MontgomeryDomainFieldElement) void {
    @setRuntimeSafety(mode == .debug);

    out1[0] = 0xffffffff00000001;
    out1[1] = 0xffffffff;
    out1[2] = 0x1;
    out1[3] = 0x0;
    out1[4] = 0x0;
    out1[5] = 0x0;
}