Interface JWEHeader

All Superinterfaces:
JWSHeader

public interface JWEHeader
extends JWSHeader
JSON Web Encryption (JWE) header.

Supports all headers of the JWE specification:

  • alg
  • enc
  • epk
  • zip
  • jku
  • jwk
  • x5u
  • x5t
  • x5t#S256
  • x5c
  • kid
  • typ
  • cty
  • crit
  • apu
  • apv
  • p2s
  • p2c
  • iv
  • authTag

The header may also include header parameters; these will be serialised and parsed along the registered ones.

Example header:

 { 
   "alg" : "RSA1_5",
   "enc" : "A128CBC-HS256"
 }
 
Since:
V5.7
See Also:
JWSHeader
  • Method Details

    • getEncryptionMethod

      java.lang.String getEncryptionMethod() throws com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException
      Returns the encryption method
      Throws:
      com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException - thrown if the header is invalid
      Since:
      V5.7
    • getAgreementPartyUInfo

      java.lang.String getAgreementPartyUInfo() throws com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException
      Gets the agreement PartyUInfo (apu) parameter.
      Returns:
      The agreement PartyUInfo parameter, null if not specified.
      Throws:
      com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException - thrown if the header is invalid
      Since:
      V5.7
    • getCompressionAlgorithm

      java.lang.String getCompressionAlgorithm() throws com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException
      Returns the compression algorithm (zip) parameter.
      Returns:
      The compression algorithm parameter, null if not specified.
      Throws:
      com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException - thrown if the header is invalid
      Since:
      V5.7
    • getAgreementPartyVInfo

      java.lang.String getAgreementPartyVInfo() throws com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException
      Returns the agreement PartyVInfo (apv) parameter.
      Returns:
      The agreement PartyVInfo parameter, null if not specified.
      Throws:
      com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException - thrown if the header is invalid
      Since:
      V5.7
    • getPBES2Salt

      java.lang.String getPBES2Salt() throws com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException
      Returns the PBES2 salt (p2s) parameter.
      Returns:
      The PBES2 salt parameter, null if not specified.
      Throws:
      com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException - thrown if the header is invalid
      Since:
      V5.7
    • getPBES2Count

      int getPBES2Count() throws com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException
      Returns the PBES2 count (p2c) parameter.
      Returns:
      The PBES2 count parameter, zero if not specified.
      Throws:
      com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException - thrown if the header is invalid
      Since:
      V5.7
    • getIV

      java.lang.String getIV() throws com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException
      Returns the initialization vector (iv) parameter.
      Returns:
      The initialization vector, null if not specified.
      Throws:
      com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException - thrown if the header is invalid
      Since:
      V5.7
    • getAuthTag

      java.lang.String getAuthTag() throws com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException
      Returns the authentication tag (tag) parameter.
      Returns:
      The authentication tag, null if not specified.
      Throws:
      com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException - thrown if the header is invalid
      Since:
      V5.7