[][src]Struct secret_integers::U32

pub struct U32(pub u32);

Methods

impl U32[src]

pub fn classify<T: Into<u32>>(x: T) -> Self[src]

pub fn declassify(self) -> u32[src]

Warning: use with caution, breaks the constant-time guarantee.

pub fn zero() -> Self[src]

pub fn one() -> Self[src]

pub fn ones() -> Self[src]

pub fn from_bytes_le(bytes: &[U8]) -> Vec<U32>[src]

pub fn to_bytes_le(ints: &[U32]) -> Vec<U8>[src]

pub fn from_bytes_be(bytes: &[U8]) -> Vec<U32>[src]

pub fn to_bytes_be(ints: &[U32]) -> Vec<U8>[src]

pub fn to_be_bytes(&self) -> Vec<u8>[src]

impl U32[src]

pub fn checked_add(self, rhs: Self) -> Self[src]

Warning: panics when overflow.

impl U32[src]

pub fn checked_sub(self, rhs: Self) -> Self[src]

Warning: panics when overflow.

impl U32[src]

pub fn checked_mul(self, rhs: Self) -> Self[src]

Warning: panics when overflow.

impl U32[src]

pub fn rotate_left(self, rotval: u32) -> Self[src]

pub fn rotate_right(self, rotval: u32) -> Self[src]

impl U32[src]

pub fn comp_eq(self, rhs: Self) -> Self[src]

Produces a new integer which is all ones if the two arguments are equal and all zeroes otherwise. With inspiration from Wireguard.

pub fn comp_ne(self, rhs: Self) -> Self[src]

Produces a new integer which is all ones if the first argument is different from the second argument, and all zeroes otherwise.

pub fn comp_gte(self, rhs: Self) -> Self[src]

Produces a new integer which is all ones if the first argument is greater than or equal to the second argument, and all zeroes otherwise. With inspiration from WireGuard.

pub fn comp_gt(self, rhs: Self) -> Self[src]

Produces a new integer which is all ones if the first argumentis strictly greater than the second argument, and all zeroes otherwise.

pub fn comp_lte(self, rhs: Self) -> Self[src]

Produces a new integer which is all ones if the first argumentis less than or equal to the second argument, and all zeroes otherwise.

pub fn comp_lt(self, rhs: Self) -> Self[src]

Produces a new integer which is all ones if the first argumentis strictly less than the second argument, and all zeroes otherwise.

Trait Implementations

impl Add<U32> for U32[src]

Warning: has wrapping semantics.

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<U32> for U32[src]

Warning: has wrapping semantics.

impl BitAnd<U32> for U32[src]

type Output = Self

The resulting type after applying the & operator.

impl BitAndAssign<U32> for U32[src]

impl BitOr<U32> for U32[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOrAssign<U32> for U32[src]

impl BitXor<U32> for U32[src]

type Output = Self

The resulting type after applying the ^ operator.

impl BitXorAssign<U32> for U32[src]

impl Clone for U32[src]

impl Copy for U32[src]

impl Debug for U32[src]

impl Default for U32[src]

impl Display for U32[src]

impl From<U128> for U32[src]

Warning: wrapping semantics.

impl From<U16> for U32[src]

impl From<U32> for U128[src]

impl From<U32> for U64[src]

impl From<U32> for U8[src]

Warning: wrapping semantics.

impl From<U32> for U16[src]

Warning: wrapping semantics.

impl From<U32> for I32[src]

Warning: wrapping semantics.

impl From<U64> for U32[src]

Warning: wrapping semantics.

impl From<U8> for U32[src]

impl From<u32> for U32[src]

impl LowerHex for U32[src]

impl Mul<U32> for U32[src]

Warning: has wrapping semantics.

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<U32> for U32[src]

Warning: has wrapping semantics.

impl Neg for U32[src]

type Output = Self

The resulting type after applying the - operator.

impl Not for U32[src]

type Output = Self

The resulting type after applying the ! operator.

impl Shl<u32> for U32[src]

type Output = Self

The resulting type after applying the << operator.

impl ShlAssign<u32> for U32[src]

impl Shr<u32> for U32[src]

type Output = Self

The resulting type after applying the >> operator.

impl ShrAssign<u32> for U32[src]

impl Sub<U32> for U32[src]

Warning: has wrapping semantics.

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<U32> for U32[src]

Warning: has wrapping semantics.

Auto Trait Implementations

impl RefUnwindSafe for U32

impl Send for U32

impl Sync for U32

impl Unpin for U32

impl UnwindSafe for U32

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.