pub trait ShrVartime: Sized {
    // Required methods
    fn overflowing_shr_vartime(&self, shift: u32) -> CtOption<Self>;
    fn wrapping_shr_vartime(&self, shift: u32) -> Self;
}
Expand description

Right shifts, variable time in shift.

Required Methods§

source

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

Computes self >> shift.

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

source

fn wrapping_shr_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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ShrVartime for BoxedUint

Available on crate feature alloc only.
source§

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