Class JWEObjectJSON

    • Constructor Detail

      • JWEObjectJSON

        public JWEObjectJSON​(JWEObject jweObject)
        Creates a new JWE JSON object from the specified JWE object with compact serialisation. The initial state is copied from the JWE object.
        Parameters:
        jweObject - The JWE object. Must not be null.
      • JWEObjectJSON

        public JWEObjectJSON​(JWEHeader header,
                             Payload payload)
        Creates a new to-be-encrypted JSON Web Encryption (JWE) object with the specified JWE protected header and payload. The initial state will be unencrypted.
        Parameters:
        header - The JWE protected header. Must not be null.
        payload - The payload. Must not be null.
      • JWEObjectJSON

        public JWEObjectJSON​(JWEHeader header,
                             Payload payload,
                             UnprotectedHeader unprotectedHeader,
                             byte[] aad)
        Creates a new to-be-encrypted JSON Web Encryption (JWE) object with the specified JWE protected header, payload and Additional Authenticated Data (AAD). The initial state will be unencrypted.
        Parameters:
        header - The JWE protected header. Must not be null.
        payload - The payload. Must not be null.
        unprotectedHeader - The shared unprotected header, empty or null if none.
        aad - The additional authenticated data (AAD), null if none.
      • JWEObjectJSON

        public JWEObjectJSON​(JWEHeader header,
                             Base64URL cipherText,
                             Base64URL iv,
                             Base64URL authTag,
                             List<JWEObjectJSON.Recipient> recipients,
                             UnprotectedHeader unprotectedHeader,
                             byte[] aad)
        Creates a new encrypted JSON Web Encryption (JWE) object. The state will be encrypted.
        Parameters:
        header - The JWE protected header. Must not be null.
        cipherText - The cipher text. Must not be null.
        iv - The initialisation vector, empty or null if none.
        authTag - The authentication tag, empty or null if none.
        recipients - The recipients list. Must not be null.
        unprotectedHeader - The shared unprotected header, empty or null if none.
        aad - The additional authenticated data. Must not be null.