Package com.nimbusds.jose.crypto.impl
Class AAD
java.lang.Object
com.nimbusds.jose.crypto.impl.AAD
Additional authenticated data (AAD).
See RFC 7518 (JWA), section 5.1, point 14.
- Version:
- 2017-06-01
- Author:
- Vladimir Dzhuvinov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
Computes the Additional Authenticated Data (AAD) for the specified JWE header.static byte[]
Computes the Additional Authenticated Data (AAD) for the specified BASE64URL-encoded JWE header.static byte[]
computeLength
(byte[] aad) Computes the bit length of the specified Additional Authenticated Data (AAD).
-
Constructor Details
-
AAD
public AAD()
-
-
Method Details
-
compute
Computes the Additional Authenticated Data (AAD) for the specified JWE header.- Parameters:
jweHeader
- The JWE header. Must not benull
.- Returns:
- The AAD.
-
compute
Computes the Additional Authenticated Data (AAD) for the specified BASE64URL-encoded JWE header.- Parameters:
encodedJWEHeader
- The BASE64URL-encoded JWE header. Must not benull
.- Returns:
- The AAD.
-
computeLength
Computes the bit length of the specified Additional Authenticated Data (AAD). Used in AES/CBC/PKCS5Padding/HMAC-SHA2 encryption.- Parameters:
aad
- The Additional Authenticated Data (AAD). Must not benull
.- Returns:
- The computed AAD bit length, as a 64 bit big-endian representation (8 byte array).
- Throws:
IntegerOverflowException
- On a integer overflow.
-