Class JWECryptoParts

java.lang.Object
com.nimbusds.jose.JWECryptoParts

@Immutable public final class JWECryptoParts extends Object
The cryptographic parts of a JSON Web Encryption (JWE) object.
Version:
2024-04-20
Author:
Vladimir Dzhuvinov
  • Constructor Details

    • JWECryptoParts

      public JWECryptoParts(Base64URL encryptedKey, Base64URL iv, Base64URL cipherText, Base64URL authenticationTag)
      Creates a new cryptographic JWE parts instance.
      Parameters:
      encryptedKey - The encrypted key, null if not required by the encryption algorithm.
      iv - The initialisation vector (IV), null if not required by the encryption algorithm.
      cipherText - The cipher text. Must not be null.
      authenticationTag - The authentication tag, null if the JWE algorithm provides built-in integrity check.
    • JWECryptoParts

      public JWECryptoParts(JWEHeader header, Base64URL encryptedKey, Base64URL iv, Base64URL cipherText, Base64URL authenticationTag)
      Creates a new cryptographic JWE parts instance.
      Parameters:
      header - The modified JWE header, null if not.
      encryptedKey - The encrypted key, null if not required by the encryption algorithm.
      iv - The initialisation vector (IV), null if not required by the encryption algorithm.
      cipherText - The cipher text. Must not be null.
      authenticationTag - The authentication tag, null if the JWE algorithm provides built-in integrity check.
  • Method Details

    • getHeader

      public JWEHeader getHeader()
      Gets the modified JWE header.
      Returns:
      The modified JWE header, null of not.
    • getEncryptedKey

      Gets the encrypted key.
      Returns:
      The encrypted key, null if not required by the JWE algorithm or recipients are specified.
    • getInitializationVector

      Gets the initialisation vector (IV).
      Returns:
      The initialisation vector (IV), null if not required by the JWE algorithm.
    • getCipherText

      Gets the cipher text.
      Returns:
      The cipher text.
    • getAuthenticationTag

      Gets the authentication tag.
      Returns:
      The authentication tag, null if the encryption algorithm provides built-in integrity checking.