pub fn decrypt<T: Serialize + DeserializeOwned>(
        self,
        encrypted: &EncryptionResult,
        key: &jwk::JWK<T>,
    ) -> Result<Vec<u8>, Error> {
        use self::ContentEncryptionAlgorithm::*;

        match self {
            A128GCM | A192GCM | A256GCM => self.aes_gcm_decrypt(encrypted, key),
            _ => Err(Error::UnsupportedOperation),
        }
    }
/// Decrypt some payload with the provided algorith,
Decrypt some payload with the provided algorith.
Decrypt some payload with the provided algorith .
pub fn decrypt<T: Serialize + DeserializeOwned>(
        self,
        encrypted: &EncryptionResult,
        key: &jwk::JWK<T>,
    ) -> Result<Vec<u8>, Error> {
        use self::ContentEncryptionAlgorithm::*;
        match self {
            A128GCM | A192GCM | A256GCM => self.aes_gcm_decrypt(encrypted, key),
            _ => Err(Error::UnsupportedOperation),
        }
    }
pub fn decrypt < T : Serialize + DeserializeOwned > ( self , encrypted : & EncryptionResult , key : & jwk :: JWK < T > , ) -> Result < Vec < u8 > , Error > { use self :: ContentEncryptionAlgorithm :: * ; match self { A128GCM | A192GCM | A256GCM => self . aes_gcm_decrypt ( encrypted , key ) , _ => Err ( Error :: UnsupportedOperation ) , } }
Decrypt some payload with the provided algorith,
Decrypt some payload with the provided algorith
self
encrypted
&EncryptionResult
key
&jwk::JWK<T>
self
encrypted
&EncryptionResult
key
&jwk::JWK<T>