Skip to main content

CtCheckedSignedDiff

Trait CtCheckedSignedDiff 

Source
pub trait CtCheckedSignedDiff: Sized {
    type Signed;

    // Required method
    fn ct_checked_signed_diff(&self, rhs: &Self) -> CtOption<Self::Signed>;
}
Available on crate feature ct only.
Expand description

Constant-time signed difference of unsigned values (the masked counterpart of CheckedSignedDiff).

Required Associated Types§

Source

type Signed

The signed counterpart type.

Required Methods§

Source

fn ct_checked_signed_diff(&self, rhs: &Self) -> CtOption<Self::Signed>

Computes self - rhs as a signed value, None-masked if it doesn’t fit.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CtCheckedSignedDiff for u8

Source§

impl CtCheckedSignedDiff for u16

Source§

impl CtCheckedSignedDiff for u32

Source§

impl CtCheckedSignedDiff for u64

Source§

impl CtCheckedSignedDiff for u128

Source§

impl CtCheckedSignedDiff for usize

Implementors§