pub type Ctr128BE<B> = StreamCipherCoreWrapper<CtrCore<B, Ctr128BE>>;
Expand description
CTR mode with 128-bit big endian counter.
Aliased Type§
struct Ctr128BE<B> { /* private fields */ }
Implementations
Source§impl<T> StreamCipherCoreWrapper<T>where
T: StreamCipherCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> StreamCipherCoreWrapper<T>where
T: StreamCipherCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
Trait Implementations
Source§impl<T> Clone for StreamCipherCoreWrapper<T>where
T: Clone + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> Clone for StreamCipherCoreWrapper<T>where
T: Clone + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
Source§fn clone(&self) -> StreamCipherCoreWrapper<T>
fn clone(&self) -> StreamCipherCoreWrapper<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Default for StreamCipherCoreWrapper<T>where
T: Default + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> Default for StreamCipherCoreWrapper<T>where
T: Default + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
Source§fn default() -> StreamCipherCoreWrapper<T>
fn default() -> StreamCipherCoreWrapper<T>
Returns the “default value” for a type. Read more
Source§impl<T> IvSizeUser for StreamCipherCoreWrapper<T>where
T: IvSizeUser + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> IvSizeUser for StreamCipherCoreWrapper<T>where
T: IvSizeUser + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
Source§impl<T> KeyInit for StreamCipherCoreWrapper<T>where
T: KeyInit + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> KeyInit for StreamCipherCoreWrapper<T>where
T: KeyInit + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
Source§fn new(
key: &GenericArray<u8, <StreamCipherCoreWrapper<T> as KeySizeUser>::KeySize>,
) -> StreamCipherCoreWrapper<T>
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>
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>
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>where
T: KeyIvInit + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> KeyIvInit for StreamCipherCoreWrapper<T>where
T: KeyIvInit + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
Source§fn new(
key: &GenericArray<u8, <StreamCipherCoreWrapper<T> as KeySizeUser>::KeySize>,
iv: &GenericArray<u8, <StreamCipherCoreWrapper<T> as IvSizeUser>::IvSize>,
) -> StreamCipherCoreWrapper<T>
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>
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>
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>
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>)
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>where
T: KeySizeUser + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> KeySizeUser for StreamCipherCoreWrapper<T>where
T: KeySizeUser + BlockSizeUser,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
Source§impl<T> StreamCipher for StreamCipherCoreWrapper<T>where
T: StreamCipherCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> StreamCipher for StreamCipherCoreWrapper<T>where
T: StreamCipherCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
Source§fn try_apply_keystream_inout(
&mut self,
data: InOutBuf<'_, '_, u8>,
) -> Result<(), StreamCipherError>
fn try_apply_keystream_inout( &mut self, data: InOutBuf<'_, '_, u8>, ) -> Result<(), StreamCipherError>
Apply keystream to
inout
data. Read moreSource§fn try_apply_keystream(
&mut self,
buf: &mut [u8],
) -> Result<(), StreamCipherError>
fn try_apply_keystream( &mut self, buf: &mut [u8], ) -> Result<(), StreamCipherError>
Apply keystream to data behind
buf
. Read moreSource§fn apply_keystream_inout(&mut self, buf: InOutBuf<'_, '_, u8>)
fn apply_keystream_inout(&mut self, buf: InOutBuf<'_, '_, u8>)
Apply keystream to
inout
data. Read moreSource§fn apply_keystream(&mut self, buf: &mut [u8])
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>
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>where
T: StreamCipherSeekCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
impl<T> StreamCipherSeek for StreamCipherCoreWrapper<T>where
T: StreamCipherSeekCore,
<T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
<<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,
Source§fn try_current_pos<SN>(&self) -> Result<SN, OverflowError>where
SN: SeekNum,
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,
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) -> Twhere
T: SeekNum,
fn current_pos<T>(&self) -> Twhere
T: SeekNum,
Get current keystream position Read more