Threefish512

Struct Threefish512 

Source
pub struct Threefish512 { /* private fields */ }

Implementations§

Source§

impl Threefish512

Source

pub fn with_tweak( key: &GenericArray<u8, U64>, tweak0: u64, tweak1: u64, ) -> Threefish512

Trait Implementations§

Source§

impl BlockCipher for Threefish512

Source§

type BlockSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

Size of the block in bytes
Source§

type ParBlocks = UInt<UTerm, B1>

Number of blocks which can be processed in parallel by cipher implementation
Source§

fn encrypt_block(&self, block: &mut GenericArray<u8, Self::BlockSize>)

Encrypt block in-place
Source§

fn decrypt_block(&self, block: &mut GenericArray<u8, Self::BlockSize>)

Decrypt block in-place
Source§

fn encrypt_blocks( &self, blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocks>, )

Encrypt several blocks in parallel using instruction level parallelism if possible. Read more
Source§

fn encrypt_slice(&self, blocks: &mut [GenericArray<u8, Self::BlockSize>])

Encrypt a slice of blocks, leveraging parallelism when available.
Source§

fn decrypt_blocks( &self, blocks: &mut GenericArray<GenericArray<u8, Self::BlockSize>, Self::ParBlocks>, )

Decrypt several blocks in parallel using instruction level parallelism if possible. Read more
Source§

fn decrypt_slice(&self, blocks: &mut [GenericArray<u8, Self::BlockSize>])

Decrypt a slice of blocks, leveraging parallelism when available.
Source§

impl Clone for Threefish512

Source§

fn clone(&self) -> Threefish512

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl NewBlockCipher for Threefish512

Source§

type KeySize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>

Key size in bytes with which cipher guaranteed to be initialized.
Source§

fn new(key: &GenericArray<u8, U64>) -> Threefish512

Create new block cipher instance from key with fixed size.
Source§

fn new_varkey(key: &[u8]) -> Result<Self, InvalidKeyLength>

Create new block cipher instance from key with variable size. Read more
Source§

impl Copy for Threefish512

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Alg> BlockCipherMut for Alg
where Alg: BlockCipher,

Source§

type BlockSize = <Alg as BlockCipher>::BlockSize

Size of the block in bytes
Source§

fn encrypt_block( &mut self, block: &mut GenericArray<u8, <Alg as BlockCipherMut>::BlockSize>, )

Encrypt block in-place
Source§

fn decrypt_block( &mut self, block: &mut GenericArray<u8, <Alg as BlockCipherMut>::BlockSize>, )

Decrypt block in-place
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.