Class AesCbcHmacJweEncryption
- java.lang.Object
-
- org.apache.cxf.rs.security.jose.jwe.AbstractJweEncryption
-
- org.apache.cxf.rs.security.jose.jwe.JweEncryption
-
- org.apache.cxf.rs.security.jose.jwe.AesCbcHmacJweEncryption
-
- All Implemented Interfaces:
JweEncryptionProvider,JweKeyProperties
public class AesCbcHmacJweEncryption extends JweEncryption
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAesCbcHmacJweEncryption.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
Constructors Constructor Description AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt, byte[] cek, byte[] iv, KeyEncryptionProvider keyEncryptionAlgorithm)AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt, KeyEncryptionProvider keyEncryptionAlgorithm)AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt, KeyEncryptionProvider keyEncryptionAlgorithm, boolean generateCekOnce)AesCbcHmacJweEncryption(KeyEncryptionProvider keyEncryptionAlgorithm, AesCbcContentEncryptionAlgorithm contentEncryptionAlgorithm)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 AuthenticationTagProducergetAuthenticationTagProducer(AbstractJweEncryption.JweEncryptionInternal state)protected byte[]getEncryptedContentEncryptionKey(JweHeaders headers, byte[] theCek)protected static AesCbcHmacJweEncryption.MacStategetInitializedMacState(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
-
-
-
-
Constructor Detail
-
AesCbcHmacJweEncryption
public AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt, KeyEncryptionProvider keyEncryptionAlgorithm)
-
AesCbcHmacJweEncryption
public AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt, KeyEncryptionProvider keyEncryptionAlgorithm, boolean generateCekOnce)
-
AesCbcHmacJweEncryption
public AesCbcHmacJweEncryption(ContentAlgorithm cekAlgoJwt, byte[] cek, byte[] iv, KeyEncryptionProvider keyEncryptionAlgorithm)
-
AesCbcHmacJweEncryption
public AesCbcHmacJweEncryption(KeyEncryptionProvider keyEncryptionAlgorithm, AesCbcContentEncryptionAlgorithm contentEncryptionAlgorithm)
-
-
Method Detail
-
getActualCek
protected byte[] getActualCek(byte[] theCek, String algoJwt)- Overrides:
getActualCekin classAbstractJweEncryption
-
doGetActualCek
protected static byte[] doGetActualCek(byte[] theCek, String algoJwt)
-
getActualCipher
protected byte[] getActualCipher(byte[] cipher)
- Overrides:
getActualCipherin classAbstractJweEncryption
-
getAuthenticationTag
protected byte[] getAuthenticationTag(AbstractJweEncryption.JweEncryptionInternal state, byte[] cipher)
- Overrides:
getAuthenticationTagin classAbstractJweEncryption
-
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:
getAuthenticationTagProducerin classAbstractJweEncryption
-
getEncryptedContentEncryptionKey
protected byte[] getEncryptedContentEncryptionKey(JweHeaders headers, byte[] theCek)
- Overrides:
getEncryptedContentEncryptionKeyin classAbstractJweEncryption
-
-