Skip to main content

wrapping_mul

Function wrapping_mul 

Source
pub const fn wrapping_mul(
    lhs: &UintRef,
    rhs: &UintRef,
    out: &mut UintRef,
    add: bool,
) -> Limb
Expand description

Multiply two limb slices, placing the potentially-truncated result in out.

lhs and rhs may have different lengths. out must have a limb count less than or equal to the width of the wide product of lhs and rhs. add determines whether the result is simply written to out, or added to its current value.

The return value is the carry result of the wrapped multiplication (and addition, if performed).