sodium_sub

Substracting large numbers The sodium_sub() function accepts two arrays of unsigned numbers encoded in little- endian format, a and b, both of size len bytes. It computes (a - b) mod 2^(8*len) in constant time for a given length, and overwrites a with the result.

  1. alias sodium_sub = deimos.sodium.utils.sodium_sub
  2. void sodium_sub(ubyte[] a, ubyte[] b)
    version(!bin_v1_0_16)
    pragma(inline, true) @nogc @trusted
    void
    sodium_sub
    (
    scope ubyte[] a
    ,
    scope const ubyte[] b
    )

Throws

NoGcException, if a_.length != b.length

See Also

Meta

History

This function was introduced in libsodium 1.0.17.