Struct tor_llcrypto::cipher::aes::Aes128Ctr

source ·
pub struct Aes128Ctr(/* private fields */);
Expand description

AES 128 in counter mode as used by Tor.

Trait Implementations§

source§

impl InnerIvInit for Aes128Ctr

source§

fn inner_iv_init( inner: Self::Inner, iv: &GenericArray<u8, Self::IvSize> ) -> Self

Initialize value using inner and iv array.
source§

fn inner_iv_slice_init( inner: Self::Inner, iv: &[u8] ) -> Result<Self, InvalidLength>

Initialize value using inner and iv slice.
source§

impl InnerUser for Aes128Ctr

§

type Inner = Aes128Key

Inner type.
source§

impl IvSizeUser for Aes128Ctr

§

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

Initialization vector size in bytes.
source§

fn iv_size() -> usize

Return IV size in bytes.
source§

impl StreamCipher for Aes128Ctr

source§

fn try_apply_keystream_inout( &mut self, buf: 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

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<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> 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> KeyIvInit for T
where T: InnerIvInit, <T as InnerUser>::Inner: KeyInit,

source§

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

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

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

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

impl<T> KeySizeUser for T
where T: InnerUser, <T as InnerUser>::Inner: KeySizeUser,

§

type KeySize = <<T as InnerUser>::Inner as KeySizeUser>::KeySize

Key size in bytes.
source§

fn key_size() -> usize

Return key size in bytes.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V