pub fn into_encrypted<K: Serialize + DeserializeOwned>(
        self,
        key: &jwk::JWK<K>,
        options: &EncryptionOptions,
    ) -> Result<Self, Error> {
        match self {
            Compact::Encrypted(_) => Ok(self),
            Compact::Decrypted { .. } => self.encrypt(key, options),
        }
    }
/// Consumes self and encrypt it. If the token is already encrypted, this is a no-op.
///
/// You will need to provide a `jwa::EncryptionOptions` that will differ based on your chosen
/// algorithms.
///
/// If your `cek_algorithm` is not `dir` or direct, the options provided will be used to
/// encrypt your content encryption key.
///
/// If your `cek_algorithm` is `dir` or Direct, then the options will be used to encrypt
/// your content directly.
Consumes self and encrypt it. If the token is already encrypted, this is a no-op.
You will need to provide a `jwa::EncryptionOptions` that will differ based on your chosen
algorithms.

If your `cek_algorithm` is not `dir` or direct, the options provided will be used to
encrypt your content encryption key.

If your `cek_algorithm` is `dir` or Direct, then the options will be used to encrypt
your content directly.
Consumes self and encrypt it . If the token is already encrypted this is a no - op . You will need to provide a ` jwa :: EncryptionOptions ` that will differ based on your chosen algorithms . If your ` cek_algorithm ` is not ` dir ` or direct the options provided will be used to encrypt your content encryption key . If your ` cek_algorithm ` is ` dir ` or Direct then the options will be used to encrypt your content directly .
pub fn into_encrypted<K: Serialize + DeserializeOwned>(
        self,
        key: &jwk::JWK<K>,
        options: &EncryptionOptions,
    ) -> Result<Self, Error> {
        match self {
            Compact::Encrypted(_) => Ok(self),
            Compact::Decrypted { .. } => self.encrypt(key, options),
        }
    }
pub fn into_encrypted < K : Serialize + DeserializeOwned > ( self , key : & jwk :: JWK < K > , options : & EncryptionOptions , ) -> Result < Self , Error > { match self { Compact :: Encrypted ( _ ) => Ok ( self ) , Compact :: Decrypted { .. } => self . encrypt ( key , options ) , } }
Consumes self and encrypt it.
Consumes self and encrypt it .
self
key
&jwk::JWK<K>
options
&EncryptionOptions
self
key
&jwk::JWK<K>
options
&EncryptionOptions