Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


com.tangosol.net.security
Class AbstractEncryptionFilter

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.net.security.AbstractEncryptionFilter

All Implemented Interfaces:
WrapperStreamFactory, XmlConfigurable
Direct Known Subclasses:
AsymmetricEncryptionFilter, SymmetricEncryptionFilter

public abstract class AbstractEncryptionFilter
extends Base
implements WrapperStreamFactory, XmlConfigurable

Abstract implementation of a JCE-based EncryptionFilter.

Author:
mf 2006.08.08

Field Summary
static String DEFAULT_KEYSTORE_PATH
          Default KeyStore path
static String DEFAULT_KEYSTORE_TYPE
          Default KeyStore type
protected  AlgorithmParameterSpec m_specCipherParams
          The Cipher Paramaters
protected  String m_sTransformation
          The Cipher transformation
protected  ThreadLocal m_tlsCipher
          Reuseable Cipher

 

Constructor Summary
AbstractEncryptionFilter()
           

 

Method Summary
static SecurityException ensureSecurityException(Throwable e)
          Convert the passed exception to a SecurityException if necessary.
static SecurityException ensureSecurityException(Throwable e, String s)
          Convert the passed exception to a SecurityException if necessary.
protected  Cipher getCipher(int nMode, Key key)
          Return a cached thread-local initialized Cipher.
protected  AlgorithmParameterSpec getCipherParams()
          Return the Cipher's parameters
protected  String getCipherTransformation()
          Return the Cipher's transformation
 XmlElement getConfig()
          Determine the current configuration of the object.
static KeyStore getKeyStore(String sType, String sPath, char[] acPassword)
          Return a loaded KeyStore.
protected  Cipher makeCipher(int nMode, Key key)
          Return a new initialized Cipher.
protected  void setCipherParams(AlgorithmParameterSpec spec)
          Specify the Cipher's parameters.
protected  void setCipherTransformation(String sTransformation)
          Specify the Cipher's transformation.

 

Methods inherited from interface com.tangosol.io.WrapperStreamFactory
getInputStream, getOutputStream

 

Methods inherited from interface com.tangosol.run.xml.XmlConfigurable
setConfig

 

Field Detail

m_sTransformation

protected String m_sTransformation
The Cipher transformation

m_specCipherParams

protected AlgorithmParameterSpec m_specCipherParams
The Cipher Paramaters

m_tlsCipher

protected ThreadLocal m_tlsCipher
Reuseable Cipher

DEFAULT_KEYSTORE_TYPE

public static final String DEFAULT_KEYSTORE_TYPE
Default KeyStore type
See Also:
Constant Field Values

DEFAULT_KEYSTORE_PATH

public static final String DEFAULT_KEYSTORE_PATH
Default KeyStore path
See Also:
Constant Field Values

Constructor Detail

AbstractEncryptionFilter

public AbstractEncryptionFilter()

Method Detail

setCipherParams

protected void setCipherParams(AlgorithmParameterSpec spec)
Specify the Cipher's parameters.
Parameters:
spec - the Cipher's parameters

getCipherParams

protected AlgorithmParameterSpec getCipherParams()
Return the Cipher's parameters
Returns:
the Cipher's parameters

setCipherTransformation

protected void setCipherTransformation(String sTransformation)
Specify the Cipher's transformation.
Parameters:
sTransformation - the Cipher's transformation

getCipherTransformation

protected String getCipherTransformation()
Return the Cipher's transformation
Returns:
the Cipher's transformation

makeCipher

protected Cipher makeCipher(int nMode,
                            Key key)
Return a new initialized Cipher.
Parameters:
nMode - the encryption mode
key - the encryption key
Returns:
the new cipher

getCipher

protected Cipher getCipher(int nMode,
                           Key key)
Return a cached thread-local initialized Cipher.
Parameters:
nMode - the encryption mode
key - the encryption key
Returns:
a Cipher

getKeyStore

public static KeyStore getKeyStore(String sType,
                                   String sPath,
                                   char[] acPassword)
Return a loaded KeyStore.
Parameters:
sType - the KeyStore type
sPath - the path to the KeyStore
acPassword - the KeyStore password
Returns:
the loaded KeyStore

ensureSecurityException

public static SecurityException ensureSecurityException(Throwable e)
Convert the passed exception to a SecurityException if necessary.
Parameters:
e - the exception to wrap
Returns:
an instance of a SecurityException

ensureSecurityException

public static SecurityException ensureSecurityException(Throwable e,
                                                        String s)
Convert the passed exception to a SecurityException if necessary.
Parameters:
e - the exception to wrap
s - an additional description
Returns:
an instance of a SecurityException

getConfig

public XmlElement getConfig()
Description copied from interface: XmlConfigurable
Determine the current configuration of the object.
Specified by:
getConfig in interface XmlConfigurable
Returns:
the XML configuration or null

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.