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

java.lang.Object
  extended by org.apache.cxf.rs.security.jose.jwe.WrappedKeyDecryptionAlgorithm
All Implemented Interfaces:
KeyDecryptionAlgorithm
Direct Known Subclasses:
AesGcmWrapKeyDecryptionAlgorithm, AesWrapKeyDecryptionAlgorithm, RSAKeyDecryptionAlgorithm

public class WrappedKeyDecryptionAlgorithm
extends Object
implements KeyDecryptionAlgorithm


Field Summary
protected static Logger LOG
           
 
Constructor Summary
WrappedKeyDecryptionAlgorithm(Key cekDecryptionKey, KeyAlgorithm supportedAlgo)
           
WrappedKeyDecryptionAlgorithm(Key cekDecryptionKey, KeyAlgorithm supportedAlgo, boolean unwrap)
           
 
Method Summary
 KeyAlgorithm getAlgorithm()
           
protected  AlgorithmParameterSpec getAlgorithmParameterSpec(JweDecryptionInput jweDecryptionInput)
           
protected  Key getCekDecryptionKey()
           
protected  String getContentEncryptionAlgorithm(JweDecryptionInput jweDecryptionInput)
           
 byte[] getDecryptedContentEncryptionKey(JweDecryptionInput jweDecryptionInput)
           
protected  byte[] getEncryptedContentEncryptionKey(JweDecryptionInput jweDecryptionInput)
           
protected  int getKeyCipherBlockSize()
           
protected  String getKeyEncryptionAlgorithm(JweDecryptionInput jweDecryptionInput)
           
protected  void reportInvalidKeyAlgorithm(String keyAlgo)
           
protected  void validateKeyEncryptionAlgorithm(String keyAlgo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final Logger LOG
Constructor Detail

WrappedKeyDecryptionAlgorithm

public WrappedKeyDecryptionAlgorithm(Key cekDecryptionKey,
                                     KeyAlgorithm supportedAlgo)

WrappedKeyDecryptionAlgorithm

public WrappedKeyDecryptionAlgorithm(Key cekDecryptionKey,
                                     KeyAlgorithm supportedAlgo,
                                     boolean unwrap)
Method Detail

getDecryptedContentEncryptionKey

public byte[] getDecryptedContentEncryptionKey(JweDecryptionInput jweDecryptionInput)
Specified by:
getDecryptedContentEncryptionKey in interface KeyDecryptionAlgorithm

getCekDecryptionKey

protected Key getCekDecryptionKey()

getKeyCipherBlockSize

protected int getKeyCipherBlockSize()

getKeyEncryptionAlgorithm

protected String getKeyEncryptionAlgorithm(JweDecryptionInput jweDecryptionInput)

validateKeyEncryptionAlgorithm

protected void validateKeyEncryptionAlgorithm(String keyAlgo)

reportInvalidKeyAlgorithm

protected void reportInvalidKeyAlgorithm(String keyAlgo)

getContentEncryptionAlgorithm

protected String getContentEncryptionAlgorithm(JweDecryptionInput jweDecryptionInput)

getAlgorithmParameterSpec

protected AlgorithmParameterSpec getAlgorithmParameterSpec(JweDecryptionInput jweDecryptionInput)

getEncryptedContentEncryptionKey

protected byte[] getEncryptedContentEncryptionKey(JweDecryptionInput jweDecryptionInput)

getAlgorithm

public KeyAlgorithm getAlgorithm()
Specified by:
getAlgorithm in interface KeyDecryptionAlgorithm


Apache CXF