Trait ShlVartime

Source
pub trait ShlVartime: Sized {
    // Required methods
    fn overflowing_shl_vartime(&self, shift: u32) -> CtOption<Self>;
    fn wrapping_shl_vartime(&self, shift: u32) -> Self;
}
Expand description

Left shifts, variable time in shift.

Required Methods§

Source

fn overflowing_shl_vartime(&self, shift: u32) -> CtOption<Self>

Computes self << shift.

Returns None if shift >= self.bits_precision().

Source

fn wrapping_shl_vartime(&self, shift: u32) -> Self

Computes self << shift in a panic-free manner, masking off bits of shift which would cause the shift to exceed the type’s width.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ShlVartime for BoxedUint

Available on crate feature alloc only.
Source§

impl<const LIMBS: usize> ShlVartime for Int<LIMBS>

Source§

impl<const LIMBS: usize> ShlVartime for Uint<LIMBS>