pub fn cek<T>(
        self,
        content_alg: ContentEncryptionAlgorithm,
        key: &jwk::JWK<T>,
    ) -> Result<jwk::JWK<Empty>, Error>
    where
        T: Serialize + DeserializeOwned,
    {
        use self::KeyManagementAlgorithm::*;

        match self {
            DirectSymmetricKey => self.cek_direct(key),
            A128GCMKW | A256GCMKW => self.cek_aes_gcm(content_alg),
            _ => Err(Error::UnsupportedOperation),
        }
    }
/// Return the Content Encryption Key (CEK) based on the key management algorithm
///
/// If the algorithm is `dir` or `DirectSymmetricKey`, the key provided is the CEK.
/// Otherwise, the appropriate algorithm will be used to derive or generate the required CEK
/// using the provided key.
Return the Content Encryption Key (CEK) based on the key management algorithm
If the algorithm is `dir` or `DirectSymmetricKey`, the key provided is the CEK.
Otherwise, the appropriate algorithm will be used to derive or generate the required CEK
using the provided key.
Return the Content Encryption Key ( CEK ) based on the key management algorithm If the algorithm is ` dir ` or ` DirectSymmetricKey ` the key provided is the CEK . Otherwise the appropriate algorithm will be used to derive or generate the required CEK using the provided key .
pub fn cek<T>(
        self,
        content_alg: ContentEncryptionAlgorithm,
        key: &jwk::JWK<T>,
    ) -> Result<jwk::JWK<Empty>, Error>
    where
        T: Serialize + DeserializeOwned,
    {
        use self::KeyManagementAlgorithm::*;
        match self {
            DirectSymmetricKey => self.cek_direct(key),
            A128GCMKW | A256GCMKW => self.cek_aes_gcm(content_alg),
            _ => Err(Error::UnsupportedOperation),
        }
    }
pub fn cek < T > ( self , content_alg : ContentEncryptionAlgorithm , key : & jwk :: JWK < T > , ) -> Result < jwk :: JWK < Empty > , Error > where T : Serialize + DeserializeOwned , { use self :: KeyManagementAlgorithm :: * ; match self { DirectSymmetricKey => self . cek_direct ( key ) , A128GCMKW | A256GCMKW => self . cek_aes_gcm ( content_alg ) , _ => Err ( Error :: UnsupportedOperation ) , } }
Return the Content Encryption Key (CEK) based on the key management algorithm
If the algorithm is `dir` or `DirectSymmetricKey`, the key provided is the CEK.
Return the Content Encryption Key ( CEK ) based on the key management algorithm If the algorithm is ` dir ` or ` DirectSymmetricKey ` the key provided is the CEK .
self
content_alg
ContentEncryptionAlgorithm
key
&jwk::JWK<T>
self
content_alg
ContentEncryptionAlgorithm
key
&jwk::JWK<T>