Interface JWEEncrypter

    • Method Detail

      • encrypt

        JWECryptoParts encrypt​(JWEHeader header,
                               byte[] clearText,
                               byte[] aad)
                        throws JOSEException
        Encrypts the specified clear text of a JWE object.
        Parameters:
        header - The JSON Web Encryption (JWE) header. Must specify a supported JWE algorithm and method. Must not be null.
        clearText - The clear text to encrypt. Must not be null.
        aad - The additional authenticated data. Must not be null.
        Returns:
        The resulting JWE crypto parts.
        Throws:
        JOSEException - If the JWE algorithm or method is not supported or if encryption failed for some other internal reason.