pub enum ContentEncryption {
A256GCM,
A128GCM,
}Expand description
Content encryption algorithm identifier.
Variants§
Implementations§
Source§impl ContentEncryption
impl ContentEncryption
Sourcepub fn from_alg_name(name: &str) -> Result<Self, Error>
pub fn from_alg_name(name: &str) -> Result<Self, Error>
Parse a content encryption algorithm from its JWE name.
Sourcepub fn generate_cek(&self) -> Vec<u8> ⓘ
pub fn generate_cek(&self) -> Vec<u8> ⓘ
Generate a random Content Encryption Key (CEK) for this algorithm.
Sourcepub fn generate_iv(&self) -> Vec<u8> ⓘ
pub fn generate_iv(&self) -> Vec<u8> ⓘ
Generate a random IV for this algorithm.
Trait Implementations§
Source§impl Clone for ContentEncryption
impl Clone for ContentEncryption
Source§fn clone(&self) -> ContentEncryption
fn clone(&self) -> ContentEncryption
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContentEncryption
impl Debug for ContentEncryption
Source§impl Default for ContentEncryption
impl Default for ContentEncryption
Source§fn default() -> ContentEncryption
fn default() -> ContentEncryption
Returns the “default value” for a type. Read more
Source§impl PartialEq for ContentEncryption
impl PartialEq for ContentEncryption
impl Copy for ContentEncryption
impl Eq for ContentEncryption
impl StructuralPartialEq for ContentEncryption
Auto Trait Implementations§
impl Freeze for ContentEncryption
impl RefUnwindSafe for ContentEncryption
impl Send for ContentEncryption
impl Sync for ContentEncryption
impl Unpin for ContentEncryption
impl UnwindSafe for ContentEncryption
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more