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.JweEncryption
          extended by org.apache.cxf.rs.security.jose.jwe.AesCbcHmacJweEncryption
All Implemented Interfaces:
JweEncryptionProvider, JweKeyProperties

public class AesCbcHmacJweEncryption
extends JweEncryption


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, LOG
 
Constructor Summary
AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt, byte[] cek, byte[] iv, KeyEncryptionProvider keyEncryptionAlgorithm)
           
AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt, KeyEncryptionProvider keyEncryptionAlgorithm)
           
AesCbcHmacJweEncryption(String cekAlgo, KeyEncryptionProvider keyEncryptionAlgorithm)
           
 
Method Summary
protected static byte[] doGetActualCek(byte[] theCek, String algoJwt)
           
protected  byte[] getActualCek(byte[] theCek, String algoJwt)
           
protected  byte[] getActualCipher(byte[] cipher)
           
protected  byte[] getAuthenticationTag(AbstractJweEncryption.JweEncryptionInternal state, byte[] cipher)
           
protected  AuthenticationTagProducer getAuthenticationTagProducer(AbstractJweEncryption.JweEncryptionInternal state)
           
protected  int getCekSize(String algoJwt)
           
protected  byte[] getEncryptedContentEncryptionKey(JweHeaders headers, byte[] theCek)
           
protected static int getFullCekKeySize(String algoJwt)
           
protected static AesCbcHmacJweEncryption.MacState getInitializedMacState(byte[] secretKey, byte[] theIv, byte[] extraAad, JweHeaders theHeaders, String protectedHeadersJson)
           
protected static byte[] signAndGetTag(AesCbcHmacJweEncryption.MacState macState)
           
 
Methods inherited from class org.apache.cxf.rs.security.jose.jwe.AbstractJweEncryption
createCekSecretKey, encrypt, encryptInternal, getAAD, getAlgorithmParameterSpec, getContentAlgorithm, getContentEncryptionAlgoJava, getContentEncryptionAlgoJwt, getContentEncryptionAlgorithm, getContentEncryptionKey, getEncryptionOutput, getJwtHeadersWriter, getKeyAlgorithm, 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 cekAlgo,
                               KeyEncryptionProvider keyEncryptionAlgorithm)

AesCbcHmacJweEncryption

public AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt,
                               KeyEncryptionProvider keyEncryptionAlgorithm)

AesCbcHmacJweEncryption

public AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt,
                               byte[] cek,
                               byte[] iv,
                               KeyEncryptionProvider keyEncryptionAlgorithm)
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)

getActualCipher

protected byte[] getActualCipher(byte[] cipher)
Overrides:
getActualCipher in class AbstractJweEncryption

getAuthenticationTag

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

signAndGetTag

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

getInitializedMacState

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

getAuthenticationTagProducer

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

getEncryptedContentEncryptionKey

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


Apache CXF