T - the mutator subtype, for method chainingpublic interface JweHeaderMutator<T extends JweHeaderMutator<T>> extends ProtectedHeaderMutator<T>
JweHeader instance.| Modifier and Type | Method and Description |
|---|---|
T |
agreementPartyUInfo(byte[] info)
Sets any information about the JWE producer for use with key agreement algorithms.
|
T |
agreementPartyUInfo(String info)
Sets any information about the JWE producer for use with key agreement algorithms.
|
T |
agreementPartyVInfo(byte[] info)
Sets any information about the JWE recipient for use with key agreement algorithms.
|
T |
agreementPartyVInfo(String info)
Sets any information about the JWE recipient for use with key agreement algorithms.
|
T |
pbes2Count(int count)
Sets the number of PBKDF2 iterations necessary to derive the key used during JWE encryption.
|
critical, jwk, jwkSetUrl, keyId, setAlgorithm, setKeyIdcontentType, setCompressionAlgorithm, setContentType, setType, typeadd, add, delete, emptyx509Chain, x509Sha1Thumbprint, x509Sha256Thumbprint, x509UrlT agreementPartyUInfo(byte[] info)
null or empty value
removes the property from the JSON map.info - information about the JWE producer to use with key agreement algorithms.apu (Agreement PartyUInfo) Header Parameter,
Jwts.KEY.ECDH_ES,
Jwts.KEY.ECDH_ES_A128KW,
Jwts.KEY.ECDH_ES_A192KW,
Jwts.KEY.ECDH_ES_A256KWT agreementPartyUInfo(String info)
null value removes
the property from the JSON map.
If not null, this is a convenience method that calls the equivalent of the following:
agreementPartyUInfo(info.getBytes(StandardCharsets.UTF_8))
info - information about the JWE producer to use with key agreement algorithms.apu (Agreement PartyUInfo) Header Parameter,
Jwts.KEY.ECDH_ES,
Jwts.KEY.ECDH_ES_A128KW,
Jwts.KEY.ECDH_ES_A192KW,
Jwts.KEY.ECDH_ES_A256KWT agreementPartyVInfo(byte[] info)
null value removes
the property from the JSON map.info - information about the JWE recipient to use with key agreement algorithms.apv (Agreement PartyVInfo) Header Parameter,
Jwts.KEY.ECDH_ES,
Jwts.KEY.ECDH_ES_A128KW,
Jwts.KEY.ECDH_ES_A192KW,
Jwts.KEY.ECDH_ES_A256KWT agreementPartyVInfo(String info)
null value removes
the property from the JSON map.
If not null, this is a convenience method that calls the equivalent of the following:
setAgreementPartVUInfo(info.getBytes(StandardCharsets.UTF_8))
info - information about the JWE recipient to use with key agreement algorithms.apv (Agreement PartyVInfo) Header Parameter,
Jwts.KEY.ECDH_ES,
Jwts.KEY.ECDH_ES_A128KW,
Jwts.KEY.ECDH_ES_A192KW,
Jwts.KEY.ECDH_ES_A256KWT pbes2Count(int count)
KeyAlgorithm is used, JJWT will automatically choose a suitable
number of iterations based on
OWASP PBKDF2 Iteration Recommendations.
Minimum Count
IllegalArgumentException will be thrown during encryption if a specified count is
less than 1000 (one thousand), which is the
minimum number recommended by the
JWA specification. Anything less is susceptible to security attacks so the default PBKDF2
KeyAlgorithm implementations reject such values.
count - the number of PBKDF2 iterations necessary to derive the key used during JWE encryption, must be
greater than or equal to 1000 (one thousand).p2c (PBES2 Count) Header Parameter,
Jwts.KEY.PBES2_HS256_A128KW,
Jwts.KEY.PBES2_HS384_A192KW,
Jwts.KEY.PBES2_HS512_A256KW,
OWASP PBKDF2 Iteration RecommendationsCopyright © 2014–2023 jsonwebtoken.io. All rights reserved.