Trait josekit::jwe::JweContentEncryption [−][src]
pub trait JweContentEncryption: Debug + Send + Sync {
fn name(&self) -> &str;
fn key_len(&self) -> usize;
fn iv_len(&self) -> usize;
fn encrypt(
&self,
key: &[u8],
iv: Option<&[u8]>,
message: &[u8],
aad: &[u8]
) -> Result<(Vec<u8>, Option<Vec<u8>>), JoseError>;
fn decrypt(
&self,
key: &[u8],
iv: Option<&[u8]>,
encrypted_message: &[u8],
aad: &[u8],
tag: Option<&[u8]>
) -> Result<Vec<u8>, JoseError>;
fn box_clone(&self) -> Box<dyn JweContentEncryption>;
}
Expand description
Represent a algorithm of JWE enc header claim.