pub fn into_decrypted<K: Serialize + DeserializeOwned>(
        self,
        key: &jwk::JWK<K>,
        cek_alg: KeyManagementAlgorithm,
        enc_alg: ContentEncryptionAlgorithm,
    ) -> Result<Self, Error> {
        match self {
            Compact::Encrypted(_) => self.decrypt(key, cek_alg, enc_alg),
            Compact::Decrypted { .. } => Ok(self),
        }
    }
/// Consumes self and decrypt it. If the token is already decrypted,
/// this is a no-op.
Consumes self and decrypt it. If the token is already decrypted,
this is a no-op.
Consumes self and decrypt it . If the token is already decrypted this is a no - op .
pub fn into_decrypted<K: Serialize + DeserializeOwned>(
        self,
        key: &jwk::JWK<K>,
        cek_alg: KeyManagementAlgorithm,
        enc_alg: ContentEncryptionAlgorithm,
    ) -> Result<Self, Error> {
        match self {
            Compact::Encrypted(_) => self.decrypt(key, cek_alg, enc_alg),
            Compact::Decrypted { .. } => Ok(self),
        }
    }
pub fn into_decrypted < K : Serialize + DeserializeOwned > ( self , key : & jwk :: JWK < K > , cek_alg : KeyManagementAlgorithm , enc_alg : ContentEncryptionAlgorithm , ) -> Result < Self , Error > { match self { Compact :: Encrypted ( _ ) => self . decrypt ( key , cek_alg , enc_alg ) , Compact :: Decrypted { .. } => Ok ( self ) , } }
Consumes self and decrypt it.
Consumes self and decrypt it .
self
key
&jwk::JWK<K>
cek_alg
KeyManagementAlgorithm
enc_alg
ContentEncryptionAlgorithm
self
key
&jwk::JWK<K>
cek_alg
KeyManagementAlgorithm
enc_alg
ContentEncryptionAlgorithm