org.apache.cxf.rs.security.jose.jwe
Class AesCbcHmacJweEncryption

java.lang.Object
  extended by org.apache.cxf.rs.security.jose.jwe.AbstractJweEncryption
      extended by org.apache.cxf.rs.security.jose.jwe.AesCbcHmacJweEncryption
All Implemented Interfaces:
JweEncryptionProvider

public class AesCbcHmacJweEncryption
extends AbstractJweEncryption


Nested Class Summary
protected static class AesCbcHmacJweEncryption.MacState
           
 
Nested classes/interfaces inherited from class org.apache.cxf.rs.security.jose.jwe.AbstractJweEncryption
AbstractJweEncryption.JweEncryptionInternal
 
Field Summary
 
Fields inherited from class org.apache.cxf.rs.security.jose.jwe.AbstractJweEncryption
DEFAULT_AUTH_TAG_LENGTH
 
Constructor Summary
AesCbcHmacJweEncryption(JweHeaders headers, byte[] cek, byte[] iv, KeyEncryptionAlgorithm keyEncryptionAlgorithm)
           
AesCbcHmacJweEncryption(JweHeaders headers, byte[] cek, byte[] iv, KeyEncryptionAlgorithm keyEncryptionAlgorithm, JoseHeadersWriter writer)
           
AesCbcHmacJweEncryption(JweHeaders headers, KeyEncryptionAlgorithm keyEncryptionAlgorithm)
           
AesCbcHmacJweEncryption(String cekAlgoJwt, KeyEncryptionAlgorithm keyEncryptionAlgorithm)
           
 
Method Summary
protected static byte[] doGetActualCek(byte[] theCek, String algoJwt)
           
protected  byte[] getActualCek(byte[] theCek, String algoJwt)
           
protected  AuthenticationTagProducer getAuthenticationTagProducer(AbstractJweEncryption.JweEncryptionInternal state)
           
protected  int getCekSize(String algoJwt)
           
protected  byte[] getEncryptedContentEncryptionKey(byte[] theCek)
           
protected static int getFullCekKeySize(String algoJwt)
           
protected static AesCbcHmacJweEncryption.MacState getInitializedMacState(byte[] secretKey, byte[] theIv, JweHeaders theHeaders, String headersJson)
           
protected  JweCompactProducer getJweCompactProducer(AbstractJweEncryption.JweEncryptionInternal state, byte[] cipher)
           
protected static byte[] signAndGetTag(AesCbcHmacJweEncryption.MacState macState)
           
 
Methods inherited from class org.apache.cxf.rs.security.jose.jwe.AbstractJweEncryption
createCekSecretKey, createJweEncryptionState, encrypt, getAAD, getAlgorithmParameterSpec, getContentEncryptionAlgoJava, getContentEncryptionAlgoJwt, getContentEncryptionKey, getJweHeaders, getJwtHeadersWriter, getKeyEncryptionAlgo, getProvidedContentEncryptionKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AesCbcHmacJweEncryption

public AesCbcHmacJweEncryption(String cekAlgoJwt,
                               KeyEncryptionAlgorithm keyEncryptionAlgorithm)

AesCbcHmacJweEncryption

public AesCbcHmacJweEncryption(JweHeaders headers,
                               KeyEncryptionAlgorithm keyEncryptionAlgorithm)

AesCbcHmacJweEncryption

public AesCbcHmacJweEncryption(JweHeaders headers,
                               byte[] cek,
                               byte[] iv,
                               KeyEncryptionAlgorithm keyEncryptionAlgorithm)

AesCbcHmacJweEncryption

public AesCbcHmacJweEncryption(JweHeaders headers,
                               byte[] cek,
                               byte[] iv,
                               KeyEncryptionAlgorithm keyEncryptionAlgorithm,
                               JoseHeadersWriter writer)
Method Detail

getActualCek

protected byte[] getActualCek(byte[] theCek,
                              String algoJwt)
Overrides:
getActualCek in class AbstractJweEncryption

getCekSize

protected int getCekSize(String algoJwt)
Overrides:
getCekSize in class AbstractJweEncryption

doGetActualCek

protected static byte[] doGetActualCek(byte[] theCek,
                                       String algoJwt)

getFullCekKeySize

protected static int getFullCekKeySize(String algoJwt)

getJweCompactProducer

protected JweCompactProducer getJweCompactProducer(AbstractJweEncryption.JweEncryptionInternal state,
                                                   byte[] cipher)
Overrides:
getJweCompactProducer in class AbstractJweEncryption

signAndGetTag

protected static byte[] signAndGetTag(AesCbcHmacJweEncryption.MacState macState)

getInitializedMacState

protected static AesCbcHmacJweEncryption.MacState getInitializedMacState(byte[] secretKey,
                                                                         byte[] theIv,
                                                                         JweHeaders theHeaders,
                                                                         String headersJson)

getAuthenticationTagProducer

protected AuthenticationTagProducer getAuthenticationTagProducer(AbstractJweEncryption.JweEncryptionInternal state)
Overrides:
getAuthenticationTagProducer in class AbstractJweEncryption

getEncryptedContentEncryptionKey

protected byte[] getEncryptedContentEncryptionKey(byte[] theCek)
Overrides:
getEncryptedContentEncryptionKey in class AbstractJweEncryption


Apache CXF