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 JWEcontent(byte[] content)StringencodeJwe()StringencodeJwe(JWEAlgorithmProvider algorithmProvider, JWEEncryptionProvider encryptionProvider)byte[]getAuthenticationTag()StringgetBase64Header()byte[]getContent()byte[]getEncryptedContent()JOSEHeadergetHeader()Returns the JWT header.byte[]getInitializationVector()JWEKeyStoragegetKeyStorage()JWEheader(JWEHeader header)voidsetEncryptedContentInfo(byte[] initializationVector, byte[] encryptedContent, byte[] authenticationTag)JWEverifyAndDecodeJwe()JWEverifyAndDecodeJwe(String jweStr)JWEverifyAndDecodeJwe(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:JOSEReturns 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
-
-