ctr

Type Alias Ctr64LE

Source
pub type Ctr64LE<B> = StreamCipherCoreWrapper<CtrCore<B, Ctr64LE>>;
Expand description

CTR mode with 64-bit little endian counter.

Aliased Type§

struct Ctr64LE<B> { /* 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> IvSizeUser for StreamCipherCoreWrapper<T>

Source§

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§

fn generate_key( rng: impl CryptoRng + RngCore, ) -> GenericArray<u8, Self::KeySize>

Generate random key using the provided CryptoRng.
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§

fn generate_key( rng: impl CryptoRng + RngCore, ) -> GenericArray<u8, Self::KeySize>

Generate random key using the provided CryptoRng.
Source§

fn generate_iv(rng: impl CryptoRng + RngCore) -> GenericArray<u8, Self::IvSize>

Generate random IV using the provided CryptoRng.
Source§

fn generate_key_iv( rng: impl CryptoRng + RngCore, ) -> (GenericArray<u8, Self::KeySize>, GenericArray<u8, Self::IvSize>)

Generate random key and nonce using the provided CryptoRng.
Source§

impl<T> KeySizeUser for StreamCipherCoreWrapper<T>

Source§

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