[][src]Struct ctr::Ctr32BE

pub struct Ctr32BE<B> where
    B: BlockCipher,
    B::ParBlocks: ArrayLength<GenericArray<u8, B::BlockSize>>,
    Block<B>: Copy
{ /* fields omitted */ }

CTR mode with a 32-bit big endian counter.

Used by e.g. AES-GCM.

Implementations

impl<B> Ctr32BE<B> where
    B: BlockCipher,
    B::ParBlocks: ArrayLength<Block<B>>,
    Block<B>: Copy
[src]

pub fn seek_ctr(&mut self, pos: u32)[src]

Seek to the given NIST SP800-38D counter value.

Note: the serialized counter value is 1 larger than the argument value.

pub fn current_ctr(&self) -> u32[src]

Get the current NIST SP800-38D counter value.

Trait Implementations

impl<B> FromBlockCipher for Ctr32BE<B> where
    B: BlockCipher,
    B::ParBlocks: ArrayLength<Block<B>>,
    Block<B>: Copy
[src]

type BlockCipher = B

Block cipher

type NonceSize = B::BlockSize

Nonce size in bytes

impl<B> SyncStreamCipher for Ctr32BE<B> where
    B: BlockCipher,
    B::ParBlocks: ArrayLength<Block<B>>,
    Block<B>: Copy
[src]

Auto Trait Implementations

impl<B> Send for Ctr32BE<B> where
    B: Send,
    <B as BlockCipher>::BlockSize: ArrayLength<u8>, 

impl<B> Sync for Ctr32BE<B> where
    B: Sync,
    <B as BlockCipher>::BlockSize: ArrayLength<u8>, 

impl<B> Unpin for Ctr32BE<B> where
    B: Unpin,
    <<B as BlockCipher>::BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
    <<B as BlockCipher>::ParBlocks as ArrayLength<GenericArray<u8, <B as BlockCipher>::BlockSize>>>::ArrayType: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<C> FromBlockCipherMut for C where
    C: FromBlockCipher
[src]

type BlockCipher = <C as FromBlockCipher>::BlockCipher

Block cipher

type NonceSize = <C as FromBlockCipher>::NonceSize

Nonce size in bytes

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<C> NewStreamCipher for C where
    C: FromBlockCipherMut,
    <C as FromBlockCipherMut>::BlockCipher: NewBlockCipher
[src]

type KeySize = <<C as FromBlockCipherMut>::BlockCipher as NewBlockCipher>::KeySize

Key size in bytes

type NonceSize = <C as FromBlockCipherMut>::NonceSize

Nonce size in bytes

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<C> StreamCipher for C where
    C: SyncStreamCipher
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.