Trait josekit::jwe::JweDecrypter [−][src]
pub trait JweDecrypter: Debug + Send + Sync {
fn algorithm(&self) -> &dyn JweAlgorithm;
fn key_id(&self) -> Option<&str>;
fn decrypt(
&self,
encrypted_key: Option<&[u8]>,
cencryption: &dyn JweContentEncryption,
header: &JweHeader
) -> Result<Cow<'_, [u8]>, JoseError>;
fn box_clone(&self) -> Box<dyn JweDecrypter>;
}
Required methods
fn algorithm(&self) -> &dyn JweAlgorithm
fn algorithm(&self) -> &dyn JweAlgorithm
Return the source algorithm instance.
Return the source key ID. The default value is a value of kid parameter in JWK.
Return a decrypted key.
Arguments
encrypted_key
- The encrypted key.cencryption
- The content encryption method.header
- The header