[][src]Struct aes_sid::AesSid

pub struct AesSid<C> where
    C: BlockCipher<BlockSize = U16> + Clone,
    C::ParBlocks: ArrayLength<GenericArray<u8, U16>>, 
{ /* fields omitted */ }

Methods

impl<C> AesSid<C> where
    C: BlockCipher<BlockSize = U16> + Clone,
    C::ParBlocks: ArrayLength<GenericArray<u8, U16>>, 
[src]

pub fn new(key: &GenericArray<u8, C::KeySize>) -> Self[src]

Create a new AES-SID instance from the given key

pub fn encrypt(&self, value: u64) -> [u8; 16][src]

Encrypt the given 64-bit integer, returning its ciphertext

pub fn decrypt(&self, ciphertext: impl TryInto<[u8; 16]>) -> Result<u64, ()>[src]

Decrypt the given ciphertext, returning the original value on success or an error if the ciphertext is inauthentic

Auto Trait Implementations

impl<C> RefUnwindSafe for AesSid<C> where
    C: RefUnwindSafe

impl<C> Send for AesSid<C> where
    C: Send

impl<C> Sync for AesSid<C> where
    C: Sync

impl<C> Unpin for AesSid<C> where
    C: Unpin

impl<C> UnwindSafe for AesSid<C> where
    C: UnwindSafe

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<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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.