Struct teaclave_crypto::AesGcm256Key
source · [−]Fields
key: [u8; 32]
iv: [u8; 12]
Implementations
sourceimpl AesGcm256Key
impl AesGcm256Key
pub const SCHEMA: &'static str = "aes-gcm-256"
pub fn new(in_key: &[u8], in_iv: &[u8]) -> Result<Self>
pub fn from_hex(in_key: impl AsRef<str>, in_iv: impl AsRef<str>) -> Result<Self>
pub fn random() -> Self
pub fn decrypt(&self, in_out: &mut Vec<u8>) -> Result<[u8; 16]>
pub fn encrypt(&self, in_out: &mut Vec<u8>) -> Result<[u8; 16]>
Trait Implementations
sourceimpl Clone for AesGcm256Key
impl Clone for AesGcm256Key
sourcefn clone(&self) -> AesGcm256Key
fn clone(&self) -> AesGcm256Key
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AesGcm256Key
impl Debug for AesGcm256Key
sourceimpl Default for AesGcm256Key
impl Default for AesGcm256Key
sourceimpl<'de> Deserialize<'de> for AesGcm256Key
impl<'de> Deserialize<'de> for AesGcm256Key
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<AesGcm256Key> for AesGcm256Key
impl PartialEq<AesGcm256Key> for AesGcm256Key
sourcefn eq(&self, other: &AesGcm256Key) -> bool
fn eq(&self, other: &AesGcm256Key) -> bool
sourceimpl Serialize for AesGcm256Key
impl Serialize for AesGcm256Key
impl Copy for AesGcm256Key
impl StructuralPartialEq for AesGcm256Key
Auto Trait Implementations
impl RefUnwindSafe for AesGcm256Key
impl Send for AesGcm256Key
impl Sync for AesGcm256Key
impl Unpin for AesGcm256Key
impl UnwindSafe for AesGcm256Key
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