org.apache.cxf.rs.security.oauth2.jwe
Class AbstractJweEncryption

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.jwe.AbstractJweEncryption
All Implemented Interfaces:
JweEncryptionProvider
Direct Known Subclasses:
DirectKeyJweEncryption, WrappedKeyJweEncryption

public abstract class AbstractJweEncryption
extends Object
implements JweEncryptionProvider


Field Summary
protected static int DEFAULT_AUTH_TAG_LENGTH
           
protected static int DEFAULT_IV_SIZE
           
 
Constructor Summary
protected AbstractJweEncryption(JweHeaders headers)
           
protected AbstractJweEncryption(JweHeaders headers, byte[] cek, byte[] iv)
           
protected AbstractJweEncryption(JweHeaders headers, byte[] cek, byte[] iv, int authTagLen)
           
protected AbstractJweEncryption(JweHeaders headers, byte[] cek, byte[] iv, int authTagLen, JwtHeadersWriter writer)
           
protected AbstractJweEncryption(SecretKey cek, byte[] iv)
           
 
Method Summary
 JweEncryption createJweEncryption(String contentType)
           
 String encrypt(byte[] content, String contentType)
           
protected  int getAuthTagLen()
           
protected  String getContentEncryptionAlgoJava()
           
protected  String getContentEncryptionAlgoJwt()
           
protected  byte[] getContentEncryptionCipherInitVector()
           
protected  AlgorithmParameterSpec getContentEncryptionCipherSpec(byte[] theIv)
           
protected  byte[] getContentEncryptionKey()
           
protected abstract  byte[] getEncryptedContentEncryptionKey(byte[] theCek)
           
protected  JweHeaders getJweHeaders()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_IV_SIZE

protected static final int DEFAULT_IV_SIZE
See Also:
Constant Field Values

DEFAULT_AUTH_TAG_LENGTH

protected static final int DEFAULT_AUTH_TAG_LENGTH
See Also:
Constant Field Values
Constructor Detail

AbstractJweEncryption

protected AbstractJweEncryption(SecretKey cek,
                                byte[] iv)

AbstractJweEncryption

protected AbstractJweEncryption(JweHeaders headers,
                                byte[] cek,
                                byte[] iv)

AbstractJweEncryption

protected AbstractJweEncryption(JweHeaders headers,
                                byte[] cek,
                                byte[] iv,
                                int authTagLen)

AbstractJweEncryption

protected AbstractJweEncryption(JweHeaders headers)

AbstractJweEncryption

protected AbstractJweEncryption(JweHeaders headers,
                                byte[] cek,
                                byte[] iv,
                                int authTagLen,
                                JwtHeadersWriter writer)
Method Detail

getContentEncryptionCipherSpec

protected AlgorithmParameterSpec getContentEncryptionCipherSpec(byte[] theIv)

getContentEncryptionCipherInitVector

protected byte[] getContentEncryptionCipherInitVector()

getContentEncryptionKey

protected byte[] getContentEncryptionKey()

getEncryptedContentEncryptionKey

protected abstract byte[] getEncryptedContentEncryptionKey(byte[] theCek)

getContentEncryptionAlgoJwt

protected String getContentEncryptionAlgoJwt()

getContentEncryptionAlgoJava

protected String getContentEncryptionAlgoJava()

getAuthTagLen

protected int getAuthTagLen()

getJweHeaders

protected JweHeaders getJweHeaders()

encrypt

public String encrypt(byte[] content,
                      String contentType)
Specified by:
encrypt in interface JweEncryptionProvider

createJweEncryption

public JweEncryption createJweEncryption(String contentType)
Specified by:
createJweEncryption in interface JweEncryptionProvider


Apache CXF