Package org.keycloak.jose.jwe
Class JWE
- java.lang.Object
-
- org.keycloak.jose.jwe.JWE
-
- All Implemented Interfaces:
JOSE
public class JWE extends Object implements JOSE
- Author:
- Marek Posolda
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JWE
content(byte[] content)
String
encodeJwe()
String
encodeJwe(JWEAlgorithmProvider algorithmProvider, JWEEncryptionProvider encryptionProvider)
byte[]
getAuthenticationTag()
String
getBase64Header()
byte[]
getContent()
byte[]
getEncryptedContent()
JOSEHeader
getHeader()
Returns the JWT header.byte[]
getInitializationVector()
JWEKeyStorage
getKeyStorage()
JWE
header(JWEHeader header)
void
setEncryptedContentInfo(byte[] initializationVector, byte[] encryptedContent, byte[] authenticationTag)
JWE
verifyAndDecodeJwe()
JWE
verifyAndDecodeJwe(String jweStr)
JWE
verifyAndDecodeJwe(String jweStr, JWEAlgorithmProvider algorithmProvider, JWEEncryptionProvider encryptionProvider)
-
-
-
Constructor Detail
-
JWE
public JWE()
-
JWE
public JWE(String jwt)
-
-
Method Detail
-
getHeader
public JOSEHeader getHeader()
Description copied from interface:JOSE
Returns the JWT header.
-
getBase64Header
public String getBase64Header() throws IOException
- Throws:
IOException
-
getKeyStorage
public JWEKeyStorage getKeyStorage()
-
getInitializationVector
public byte[] getInitializationVector()
-
content
public JWE content(byte[] content)
-
getContent
public byte[] getContent()
-
getEncryptedContent
public byte[] getEncryptedContent()
-
getAuthenticationTag
public byte[] getAuthenticationTag()
-
setEncryptedContentInfo
public void setEncryptedContentInfo(byte[] initializationVector, byte[] encryptedContent, byte[] authenticationTag)
-
encodeJwe
public String encodeJwe() throws JWEException
- Throws:
JWEException
-
encodeJwe
public String encodeJwe(JWEAlgorithmProvider algorithmProvider, JWEEncryptionProvider encryptionProvider) throws JWEException
- Throws:
JWEException
-
verifyAndDecodeJwe
public JWE verifyAndDecodeJwe(String jweStr) throws JWEException
- Throws:
JWEException
-
verifyAndDecodeJwe
public JWE verifyAndDecodeJwe(String jweStr, JWEAlgorithmProvider algorithmProvider, JWEEncryptionProvider encryptionProvider) throws JWEException
- Throws:
JWEException
-
verifyAndDecodeJwe
public JWE verifyAndDecodeJwe() throws JWEException
- Throws:
JWEException
-
-