Class DefaultJWEDecrypterFactory

    • Field Detail

      • SUPPORTED_ALGORITHMS

        public static final java.util.Set<JWEAlgorithm> SUPPORTED_ALGORITHMS
        The supported JWE algorithms.
      • SUPPORTED_ENCRYPTION_METHODS

        public static final java.util.Set<EncryptionMethod> SUPPORTED_ENCRYPTION_METHODS
        The supported encryption methods.
    • Constructor Detail

      • DefaultJWEDecrypterFactory

        public DefaultJWEDecrypterFactory()
    • Method Detail

      • supportedJWEAlgorithms

        public java.util.Set<JWEAlgorithm> supportedJWEAlgorithms()
        Description copied from interface: JWEProvider
        Returns the names of the supported algorithms by the JWE provider instance. These correspond to the alg JWE header parameter.
        Specified by:
        supportedJWEAlgorithms in interface JWEProvider
        Returns:
        The supported JWE algorithms, empty set if none.
      • supportedEncryptionMethods

        public java.util.Set<EncryptionMethod> supportedEncryptionMethods()
        Description copied from interface: JWEProvider
        Returns the names of the supported encryption methods by the JWE provier. These correspond to the enc JWE header parameter.
        Specified by:
        supportedEncryptionMethods in interface JWEProvider
        Returns:
        The supported encryption methods, empty set if none.
      • getJCAContext

        public JWEJCAContext getJCAContext()
        Description copied from interface: JCAAware
        Returns the Java Cryptography Architecture (JCA) context. May be used to set a specific JCA security provider or secure random generator.
        Specified by:
        getJCAContext in interface JCAAware<JWEJCAContext>
        Returns:
        The JCA context. Not null.
      • createJWEDecrypter

        public JWEDecrypter createJWEDecrypter​(JWEHeader header,
                                               java.security.Key key)
                                        throws JOSEException
        Description copied from interface: JWEDecrypterFactory
        Creates a new JWE decrypter for the specified header and key.
        Specified by:
        createJWEDecrypter in interface JWEDecrypterFactory
        Parameters:
        header - The JWE header. Not null.
        key - The key intended to verify the JWS message. Not null.
        Returns:
        The JWE decrypter.
        Throws:
        JOSEException - If the JWE algorithm / encryption method is not supported or the key type or length doesn't match expected for the JWE algorithm.