Package com.nimbusds.jose.crypto.impl
Class DeflateHelper
java.lang.Object
com.nimbusds.jose.crypto.impl.DeflateHelper
Deflate (RFC 1951) helper methods, intended for use by JWE encrypters and
decrypters. This class is thread-safe.
- Version:
- 2014-07-08
- Author:
- Vladimir Dzhuvinov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
applyCompression
(JWEHeader jweHeader, byte[] bytes) Applies compression to the specified plain text if requested.static byte[]
applyDecompression
(JWEHeader jweHeader, byte[] bytes) Applies decompression to the specified plain text if requested.
-
Constructor Details
-
DeflateHelper
public DeflateHelper()
-
-
Method Details
-
applyCompression
Applies compression to the specified plain text if requested.- Parameters:
jweHeader
- The JWE header. Must not benull
.bytes
- The plain text bytes. Must not benull
.- Returns:
- The bytes to encrypt.
- Throws:
JOSEException
- If compression failed or the requested compression algorithm is not supported.
-
applyDecompression
Applies decompression to the specified plain text if requested.- Parameters:
jweHeader
- The JWE header. Must not benull
.bytes
- The plain text bytes. Must not benull
.- Returns:
- The output bytes, decompressed if requested.
- Throws:
JOSEException
- If decompression failed or the requested compression algorithm is not supported.
-