public interface JWEZip
A JWE zip implements a JWE compression algorithm used to compress or decompress a JWE object payload based on the compression algorithm JWE JOSE header parameter.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDEFLATE ZIP algorithm as defined by RFC7516 Section 4.1.3. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compress(byte[] data) Compresses the specified data.byte[]decompress(byte[] data) Decompresses the specified data.booleanDetermines whether the JWE zip supports the specified compression algorithm.
-
Field Details
-
ZIP_DEFLATE
DEFLATE ZIP algorithm as defined by RFC7516 Section 4.1.3.- See Also:
-
-
Method Details
-
supports
Determines whether the JWE zip supports the specified compression algorithm.
- Parameters:
zip- a compression algorithm- Returns:
- true if the JWE zip supports the compression algorithm, false otherwise
-
compress
Compresses the specified data.
- Parameters:
data- the data to compress- Returns:
- compressed data
- Throws:
JWEZipException- if these was an error compressing the data
-
decompress
Decompresses the specified data.
- Parameters:
data- the data to decompress- Returns:
- decompressed data
- Throws:
JWEZipException- if these was an error decompressing the data
-