Struct teaclave_crypto::AesGcm128Key
source · [−]pub struct AesGcm128Key {
pub key: [u8; 16],
pub iv: [u8; 12],
}
Fields
key: [u8; 16]
iv: [u8; 12]
Implementations
sourceimpl AesGcm128Key
impl AesGcm128Key
pub const SCHEMA: &'static str = "aes-gcm-128"
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 AesGcm128Key
impl Clone for AesGcm128Key
sourcefn clone(&self) -> AesGcm128Key
fn clone(&self) -> AesGcm128Key
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AesGcm128Key
impl Debug for AesGcm128Key
sourceimpl Default for AesGcm128Key
impl Default for AesGcm128Key
sourceimpl<'de> Deserialize<'de> for AesGcm128Key
impl<'de> Deserialize<'de> for AesGcm128Key
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<AesGcm128Key> for AesGcm128Key
impl PartialEq<AesGcm128Key> for AesGcm128Key
sourcefn eq(&self, other: &AesGcm128Key) -> bool
fn eq(&self, other: &AesGcm128Key) -> bool
sourceimpl Serialize for AesGcm128Key
impl Serialize for AesGcm128Key
impl Copy for AesGcm128Key
impl StructuralPartialEq for AesGcm128Key
Auto Trait Implementations
impl RefUnwindSafe for AesGcm128Key
impl Send for AesGcm128Key
impl Sync for AesGcm128Key
impl Unpin for AesGcm128Key
impl UnwindSafe for AesGcm128Key
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more