[−][src]Struct aes_sid::AesSid
Methods
impl<C> AesSid<C> where
C: BlockCipher<BlockSize = U16> + Clone,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
[src]
C: BlockCipher<BlockSize = U16> + Clone,
C::ParBlocks: ArrayLength<GenericArray<u8, U16>>,
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,
C: RefUnwindSafe,
impl<C> Send for AesSid<C> where
C: Send,
C: Send,
impl<C> Sync for AesSid<C> where
C: Sync,
C: Sync,
impl<C> Unpin for AesSid<C> where
C: Unpin,
C: Unpin,
impl<C> UnwindSafe for AesSid<C> where
C: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,