Type Alias salsa20::Salsa8

source ·
pub type Salsa8 = StreamCipherCoreWrapper<SalsaCore<U4>>;
Expand description

Salsa20/8 stream cipher (reduced-round variant of Salsa20 with 8 rounds, not recommended)

Aliased Type§

struct Salsa8 { /* private fields */ }

Implementations

source§

impl<T> StreamCipherCoreWrapper<T>

source

pub fn get_core(&self) -> &T

Return reference to the core type.

source

pub fn from_core(core: T) -> StreamCipherCoreWrapper<T>

Return reference to the core type.

Trait Implementations

source§

impl<T> Clone for StreamCipherCoreWrapper<T>

source§

fn clone(&self) -> StreamCipherCoreWrapper<T>

Returns a copy 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<T> Default for StreamCipherCoreWrapper<T>

source§

fn default() -> StreamCipherCoreWrapper<T>

Returns the “default value” for a type. Read more
source§

impl<T> Drop for StreamCipherCoreWrapper<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T> IvSizeUser for StreamCipherCoreWrapper<T>

§

type IvSize = <T as IvSizeUser>::IvSize

Initialization vector size in bytes.
source§

fn iv_size() -> usize

Return IV size in bytes.
source§

impl<T> KeyInit for StreamCipherCoreWrapper<T>

source§

fn new( key: &GenericArray<u8, <StreamCipherCoreWrapper<T> as KeySizeUser>::KeySize> ) -> StreamCipherCoreWrapper<T>

Create new value from fixed size key.
source§

fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>

Create new value from variable size key.
source§

impl<T> KeyIvInit for StreamCipherCoreWrapper<T>

source§

fn new( key: &GenericArray<u8, <StreamCipherCoreWrapper<T> as KeySizeUser>::KeySize>, iv: &GenericArray<u8, <StreamCipherCoreWrapper<T> as IvSizeUser>::IvSize> ) -> StreamCipherCoreWrapper<T>

Create new value from fixed length key and nonce.
source§

fn new_from_slices(key: &[u8], iv: &[u8]) -> Result<Self, InvalidLength>

Create new value from variable length key and nonce.
source§

impl<T> KeySizeUser for StreamCipherCoreWrapper<T>

§

type KeySize = <T as KeySizeUser>::KeySize

Key size in bytes.
source§

fn key_size() -> usize

Return key size in bytes.
source§

impl<T> StreamCipher for StreamCipherCoreWrapper<T>

source§

fn try_apply_keystream_inout( &mut self, data: InOutBuf<'_, '_, u8> ) -> Result<(), StreamCipherError>

Apply keystream to inout data. Read more
source§

fn try_apply_keystream( &mut self, buf: &mut [u8] ) -> Result<(), StreamCipherError>

Apply keystream to data behind buf. Read more
source§

fn apply_keystream_inout(&mut self, buf: InOutBuf<'_, '_, u8>)

Apply keystream to inout data. Read more
source§

fn apply_keystream(&mut self, buf: &mut [u8])

Apply keystream to data in-place. Read more
source§

fn apply_keystream_b2b( &mut self, input: &[u8], output: &mut [u8] ) -> Result<(), StreamCipherError>

Apply keystream to data buffer-to-buffer. Read more
source§

impl<T> StreamCipherSeek for StreamCipherCoreWrapper<T>

source§

fn try_current_pos<SN>(&self) -> Result<SN, OverflowError>
where SN: SeekNum,

Try to get current keystream position Read more
source§

fn try_seek<SN>(&mut self, new_pos: SN) -> Result<(), StreamCipherError>
where SN: SeekNum,

Try to seek to the given position Read more
source§

fn current_pos<T>(&self) -> T
where T: SeekNum,

Get current keystream position Read more
source§

fn seek<T>(&mut self, pos: T)
where T: SeekNum,

Seek to the given position Read more
source§

impl<T> ZeroizeOnDrop for StreamCipherCoreWrapper<T>