pub trait DecryptionKey: AgentKey {
// Required methods
fn decrypt<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
ciphertext: &'life1 [u8],
encrypted_key: &'life2 [u8],
iv: &'life3 [u8],
tag: &'life4 [u8],
aad: Option<&'life5 [u8]>,
sender_key: Option<&'life6 dyn VerificationKey>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait;
fn unwrap_jwe<'life0, 'life1, 'async_trait>(
&'life0 self,
jwe: &'life1 Jwe,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Agent key capable of decrypting JWE data.
Implementations of this trait can decrypt JWE ciphertexts that were encrypted for this key.
Required Methods§
Sourcefn decrypt<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
ciphertext: &'life1 [u8],
encrypted_key: &'life2 [u8],
iv: &'life3 [u8],
tag: &'life4 [u8],
aad: Option<&'life5 [u8]>,
sender_key: Option<&'life6 dyn VerificationKey>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
fn decrypt<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
ciphertext: &'life1 [u8],
encrypted_key: &'life2 [u8],
iv: &'life3 [u8],
tag: &'life4 [u8],
aad: Option<&'life5 [u8]>,
sender_key: Option<&'life6 dyn VerificationKey>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
Decrypts the provided ciphertext