IsBitDecomposable

Trait IsBitDecomposable 

Source
pub trait IsBitDecomposable:
    Shl<usize, Output = Self>
    + Shr<usize, Output = Self>
    + BitOr<Output = Self>
    + Sized
    + Copy {
    // Required method
    fn get_bit(&self, index: usize) -> Self;

    // Provided methods
    fn rotr(&self, index: usize) -> Self { ... }
    fn rotl(&self, index: usize) -> Self { ... }
}
Expand description

A trait to deal with bit decomposition and bit rotation as needed by SHA-2 family of hash functions.

Required Methods§

Source

fn get_bit(&self, index: usize) -> Self

Gets index-th bit from data

Provided Methods§

Source

fn rotr(&self, index: usize) -> Self

Rotate bits right by index amount.

Source

fn rotl(&self, index: usize) -> Self

Rotate bits left

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.

Implementations on Foreign Types§

Source§

impl IsBitDecomposable for i8

Source§

fn get_bit(&self, index: usize) -> Self

Source§

impl IsBitDecomposable for i16

Source§

fn get_bit(&self, index: usize) -> Self

Source§

impl IsBitDecomposable for i32

Source§

fn get_bit(&self, index: usize) -> Self

Source§

impl IsBitDecomposable for i64

Source§

fn get_bit(&self, index: usize) -> Self

Source§

impl IsBitDecomposable for u8

Source§

fn get_bit(&self, index: usize) -> Self

Source§

impl IsBitDecomposable for u16

Source§

fn get_bit(&self, index: usize) -> Self

Source§

impl IsBitDecomposable for u32

Source§

fn get_bit(&self, index: usize) -> Self

Source§

impl IsBitDecomposable for u64

Source§

fn get_bit(&self, index: usize) -> Self

Implementors§