pub struct Encryptor<C>where
C: BlockEncryptMut + BlockCipher,{ /* private fields */ }
Expand description
CFB mode encryptor.
Trait Implementations
sourceimpl<C> AlgorithmName for Encryptor<C>where
C: BlockEncryptMut + BlockCipher + AlgorithmName,
impl<C> AlgorithmName for Encryptor<C>where
C: BlockEncryptMut + BlockCipher + AlgorithmName,
sourcefn write_alg_name(f: &mut Formatter<'_>) -> Result
fn write_alg_name(f: &mut Formatter<'_>) -> Result
Write algorithm name into f
.
sourceimpl<C> AsyncStreamCipher for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
impl<C> AsyncStreamCipher for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
sourcefn encrypt_inout(self, data: InOutBuf<'_, '_, u8>)where
Self: BlockEncryptMut,
fn encrypt_inout(self, data: InOutBuf<'_, '_, u8>)where
Self: BlockEncryptMut,
Encrypt data using InOutBuf
.
sourcefn encrypt(self, buf: &mut [u8])where
Self: BlockEncryptMut,
fn encrypt(self, buf: &mut [u8])where
Self: BlockEncryptMut,
Encrypt data in place.
sourcefn encrypt_b2b(
self,
in_buf: &[u8],
out_buf: &mut [u8]
) -> Result<(), NotEqualError>where
Self: BlockEncryptMut,
fn encrypt_b2b(
self,
in_buf: &[u8],
out_buf: &mut [u8]
) -> Result<(), NotEqualError>where
Self: BlockEncryptMut,
Encrypt data from buffer to buffer.
sourceimpl<C> BlockEncryptMut for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
impl<C> BlockEncryptMut for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
sourcefn encrypt_with_backend_mut(
&mut self,
f: impl BlockClosure<BlockSize = Self::BlockSize>
)
fn encrypt_with_backend_mut(
&mut self,
f: impl BlockClosure<BlockSize = Self::BlockSize>
)
Encrypt data using backend provided to the rank-2 closure.
sourcefn encrypt_block_inout_mut(
&mut self,
block: InOut<'_, '_, GenericArray<u8, Self::BlockSize>>
)
fn encrypt_block_inout_mut(
&mut self,
block: InOut<'_, '_, GenericArray<u8, Self::BlockSize>>
)
Encrypt single inout
block.
sourcefn encrypt_blocks_inout_mut(
&mut self,
blocks: InOutBuf<'_, '_, GenericArray<u8, Self::BlockSize>>
)
fn encrypt_blocks_inout_mut(
&mut self,
blocks: InOutBuf<'_, '_, GenericArray<u8, Self::BlockSize>>
)
Encrypt inout
blocks.
sourcefn encrypt_block_mut(&mut self, block: &mut GenericArray<u8, Self::BlockSize>)
fn encrypt_block_mut(&mut self, block: &mut GenericArray<u8, Self::BlockSize>)
Encrypt single block in-place.
sourcefn encrypt_block_b2b_mut(
&mut self,
in_block: &GenericArray<u8, Self::BlockSize>,
out_block: &mut GenericArray<u8, Self::BlockSize>
)
fn encrypt_block_b2b_mut(
&mut self,
in_block: &GenericArray<u8, Self::BlockSize>,
out_block: &mut GenericArray<u8, Self::BlockSize>
)
Encrypt in_block
and write result to out_block
.
sourcefn encrypt_blocks_mut(
&mut self,
blocks: &mut [GenericArray<u8, Self::BlockSize>]
)
fn encrypt_blocks_mut(
&mut self,
blocks: &mut [GenericArray<u8, Self::BlockSize>]
)
Encrypt blocks in-place.
sourcefn encrypt_blocks_b2b_mut(
&mut self,
in_blocks: &[GenericArray<u8, Self::BlockSize>],
out_blocks: &mut [GenericArray<u8, Self::BlockSize>]
) -> Result<(), NotEqualError>
fn encrypt_blocks_b2b_mut(
&mut self,
in_blocks: &[GenericArray<u8, Self::BlockSize>],
out_blocks: &mut [GenericArray<u8, Self::BlockSize>]
) -> Result<(), NotEqualError>
Encrypt blocks buffer-to-buffer. Read more
sourcefn encrypt_padded_inout_mut<P>(
self,
data: InOutBufReserved<'inp, 'out, u8>
) -> Result<&'out [u8], PadError>where
P: Padding<Self::BlockSize>,
fn encrypt_padded_inout_mut<P>(
self,
data: InOutBufReserved<'inp, 'out, u8>
) -> Result<&'out [u8], PadError>where
P: Padding<Self::BlockSize>,
Pad input and encrypt. Returns resulting ciphertext slice. Read more
sourcefn encrypt_padded_mut<P>(
self,
buf: &mut [u8],
msg_len: usize
) -> Result<&[u8], PadError>where
P: Padding<Self::BlockSize>,
fn encrypt_padded_mut<P>(
self,
buf: &mut [u8],
msg_len: usize
) -> Result<&[u8], PadError>where
P: Padding<Self::BlockSize>,
Pad input and encrypt in-place. Returns resulting ciphertext slice. Read more
sourceimpl<C> BlockSizeUser for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
impl<C> BlockSizeUser for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
type BlockSize = <C as BlockSizeUser>::BlockSize
type BlockSize = <C as BlockSizeUser>::BlockSize
Size of the block in bytes.
fn block_size() -> usize
fn block_size() -> usize
Return block size in bytes.
sourceimpl<C: Clone> Clone for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
impl<C: Clone> Clone for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
sourceimpl<C> Debug for Encryptor<C>where
C: BlockEncryptMut + BlockCipher + AlgorithmName,
impl<C> Debug for Encryptor<C>where
C: BlockEncryptMut + BlockCipher + AlgorithmName,
sourceimpl<C: BlockEncryptMut + BlockCipher> Drop for Encryptor<C>
Available on crate feature zeroize
only.
impl<C: BlockEncryptMut + BlockCipher> Drop for Encryptor<C>
Available on crate feature
zeroize
only.sourceimpl<C> InnerIvInit for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
impl<C> InnerIvInit for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
sourcefn inner_iv_init(cipher: C, iv: &Iv<Self>) -> Self
fn inner_iv_init(cipher: C, iv: &Iv<Self>) -> Self
Initialize value using inner
and iv
array.
fn inner_iv_slice_init(
inner: Self::Inner,
iv: &[u8]
) -> Result<Self, InvalidLength>
fn inner_iv_slice_init(
inner: Self::Inner,
iv: &[u8]
) -> Result<Self, InvalidLength>
Initialize value using inner
and iv
slice.
sourceimpl<C> InnerUser for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
impl<C> InnerUser for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
type Inner = C
type Inner = C
Inner type.
sourceimpl<C> IvSizeUser for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
impl<C> IvSizeUser for Encryptor<C>where
C: BlockEncryptMut + BlockCipher,
sourceimpl<C> IvState for Encryptor<C>where
C: BlockEncryptMut + BlockDecrypt + BlockCipher,
impl<C> IvState for Encryptor<C>where
C: BlockEncryptMut + BlockDecrypt + BlockCipher,
impl<C: BlockEncryptMut + BlockCipher + ZeroizeOnDrop> ZeroizeOnDrop for Encryptor<C>
Available on crate feature
zeroize
only.Auto Trait Implementations
impl<C> RefUnwindSafe for Encryptor<C>where
C: RefUnwindSafe,
<<C as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<C> Send for Encryptor<C>where
C: Send,
impl<C> Sync for Encryptor<C>where
C: Sync,
impl<C> Unpin for Encryptor<C>where
C: Unpin,
<<C as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
impl<C> UnwindSafe for Encryptor<C>where
C: UnwindSafe,
<<C as BlockSizeUser>::BlockSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more