[][src]Struct secret_integers::U16

pub struct U16(pub u16);

Methods

impl U16[src]

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

pub fn declassify(self) -> u16[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<U16>[src]

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

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

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

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

impl U16[src]

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

Warning: panics when overflow.

impl U16[src]

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

Warning: panics when overflow.

impl U16[src]

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

Warning: panics when overflow.

impl U16[src]

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

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

impl U16[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<U16> for U16[src]

Warning: has wrapping semantics.

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<U16> for U16[src]

Warning: has wrapping semantics.

impl BitAnd<U16> for U16[src]

type Output = Self

The resulting type after applying the & operator.

impl BitAndAssign<U16> for U16[src]

impl BitOr<U16> for U16[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOrAssign<U16> for U16[src]

impl BitXor<U16> for U16[src]

type Output = Self

The resulting type after applying the ^ operator.

impl BitXorAssign<U16> for U16[src]

impl Clone for U16[src]

impl Copy for U16[src]

impl Debug for U16[src]

impl Default for U16[src]

impl Display for U16[src]

impl From<U128> for U16[src]

Warning: wrapping semantics.

impl From<U16> for U128[src]

impl From<U16> for U64[src]

impl From<U16> for U32[src]

impl From<U16> for U8[src]

Warning: wrapping semantics.

impl From<U16> for I16[src]

Warning: wrapping semantics.

impl From<U32> for U16[src]

Warning: wrapping semantics.

impl From<U64> for U16[src]

Warning: wrapping semantics.

impl From<U8> for U16[src]

impl From<u16> for U16[src]

impl LowerHex for U16[src]

impl Mul<U16> for U16[src]

Warning: has wrapping semantics.

type Output = Self

The resulting type after applying the * operator.

impl MulAssign<U16> for U16[src]

Warning: has wrapping semantics.

impl Neg for U16[src]

type Output = Self

The resulting type after applying the - operator.

impl Not for U16[src]

type Output = Self

The resulting type after applying the ! operator.

impl Shl<u32> for U16[src]

type Output = Self

The resulting type after applying the << operator.

impl ShlAssign<u32> for U16[src]

impl Shr<u32> for U16[src]

type Output = Self

The resulting type after applying the >> operator.

impl ShrAssign<u32> for U16[src]

impl Sub<U16> for U16[src]

Warning: has wrapping semantics.

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<U16> for U16[src]

Warning: has wrapping semantics.

Auto Trait Implementations

impl RefUnwindSafe for U16

impl Send for U16

impl Sync for U16

impl Unpin for U16

impl UnwindSafe for U16

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.