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

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

File

lib/std/crypto/pcurves/secp256k1/secp256k1_scalar_64.zig:1722

Code

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

    out1[0] = 0x402da1732fc9bebf;
    out1[1] = 0x4551231950b75fc4;
    out1[2] = 0x1;
    out1[3] = 0x0;
}