|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.net.security.AbstractEncryptionFilter
com.tangosol.net.security.SymmetricEncryptionFilter
public class SymmetricEncryptionFilter
Symmetric encryption filter implementation.
This filter encrypts data using a shared symmetric encryption key. It may either be configured with a pre-distributed shared key, or with a randomly generated key via the ClusterEncryptionFilter.
setConfig(com.tangosol.run.xml.XmlElement)
,
ClusterEncryptionFilter
Field Summary | |
---|---|
static String |
DEFAULT_ALGORITHM
Default cryptography algorithm |
static int |
DEFAULT_KEY_LENGTH
Default cryptography key length |
static String |
DEFAULT_KEYSTORE_TYPE
Default KeyStore type. |
protected SecretKey |
m_key
The SecretKey |
Fields inherited from class com.tangosol.net.security.AbstractEncryptionFilter |
---|
DEFAULT_KEYSTORE_PATH, m_specCipherParams, m_sTransformation, m_tlsCipher |
Constructor Summary | |
---|---|
SymmetricEncryptionFilter()
|
Method Summary | |
---|---|
static SecretKey |
generateKey(String sAlgorithm,
int nKeySize)
Generate a secret key according the the supplied parameters. |
InputStream |
getInputStream(InputStream stream)
Requests an InputStream that wraps the passed InputStream. |
SecretKey |
getKey()
Return the filter's encryption key. |
OutputStream |
getOutputStream(OutputStream stream)
Requests an OutputStream that wraps the passed OutputStream. |
static void |
main(String[] asArgv)
Generates and insert a symmetric key into a keystore. |
void |
setConfig(XmlElement xml)
Configures the Encryption filter for symetric encryption using a key from a KeyStore. |
void |
setKey(SecretKey key)
Specify the filter's encryption key. |
Methods inherited from class com.tangosol.net.security.AbstractEncryptionFilter |
---|
ensureSecurityException, ensureSecurityException, getCipher, getCipherParams, getCipherTransformation, getConfig, getKeyStore, makeCipher, setCipherParams, setCipherTransformation |
Field Detail |
---|
protected SecretKey m_key
public static final String DEFAULT_KEYSTORE_TYPE
public static final String DEFAULT_ALGORITHM
public static final int DEFAULT_KEY_LENGTH
Constructor Detail |
---|
public SymmetricEncryptionFilter()
Method Detail |
---|
public InputStream getInputStream(InputStream stream)
WrapperStreamFactory
stream
- the java.io.InputStream to be wrapped
public OutputStream getOutputStream(OutputStream stream)
WrapperStreamFactory
stream
- the java.io.OutputStream to be wrapped
public void setConfig(XmlElement xml)
xml
- the XML configuration for the objectpublic void setKey(SecretKey key)
key
- the filter's encryption keypublic SecretKey getKey()
public static SecretKey generateKey(String sAlgorithm, int nKeySize)
sAlgorithm
- the key algorithmnKeySize
- the key size
public static void main(String[] asArgv)
asArgv
- command line parameters
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |