org.alfresco.encryption
Class DefaultEncryptor
java.lang.Object
org.alfresco.encryption.AbstractEncryptor
org.alfresco.encryption.DefaultEncryptor
- All Implemented Interfaces:
- Encryptor
public class DefaultEncryptor
- extends AbstractEncryptor
- Since:
- 4.0
Method Summary |
protected javax.crypto.Cipher |
createCipher(int mode,
java.lang.String algorithm,
java.lang.String provider,
java.security.Key key,
java.security.AlgorithmParameters params)
|
protected javax.crypto.Cipher |
getCachedCipher(java.lang.String keyAlias,
int mode,
java.security.AlgorithmParameters params,
java.security.Key key)
|
javax.crypto.Cipher |
getCipher(java.lang.String keyAlias,
java.security.AlgorithmParameters params,
int mode)
Factory method to be written by implementations to construct and initialize
physical ciphering objects. |
void |
init()
|
boolean |
keyAvailable(java.lang.String keyAlias)
|
void |
setCacheCiphers(boolean cacheCiphers)
|
Methods inherited from class org.alfresco.encryption.AbstractEncryptor |
decodeAlgorithmParameters, decrypt, decrypt, decryptObject, encrypt, encryptObject, getCipherAlgorithm, getCipherProvider, getKeyProvider, resetCipher, sealObject, setCipherAlgorithm, setCipherProvider, setKeyProvider, unsealObject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultEncryptor
public DefaultEncryptor()
- Default constructor for IOC
init
public void init()
- Overrides:
init
in class AbstractEncryptor
setCacheCiphers
public void setCacheCiphers(boolean cacheCiphers)
createCipher
protected javax.crypto.Cipher createCipher(int mode,
java.lang.String algorithm,
java.lang.String provider,
java.security.Key key,
java.security.AlgorithmParameters params)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.NoSuchProviderException,
java.security.InvalidKeyException,
java.security.InvalidAlgorithmParameterException
- Throws:
java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException
java.security.NoSuchProviderException
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException
getCachedCipher
protected javax.crypto.Cipher getCachedCipher(java.lang.String keyAlias,
int mode,
java.security.AlgorithmParameters params,
java.security.Key key)
throws java.security.InvalidKeyException,
java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException,
java.security.NoSuchProviderException,
java.security.InvalidAlgorithmParameterException
- Throws:
java.security.InvalidKeyException
java.security.NoSuchAlgorithmException
javax.crypto.NoSuchPaddingException
java.security.NoSuchProviderException
java.security.InvalidAlgorithmParameterException
getCipher
public javax.crypto.Cipher getCipher(java.lang.String keyAlias,
java.security.AlgorithmParameters params,
int mode)
- Description copied from class:
AbstractEncryptor
- Factory method to be written by implementations to construct and initialize
physical ciphering objects.
- Specified by:
getCipher
in class AbstractEncryptor
- Parameters:
keyAlias
- the key aliasparams
- algorithm-specific parametersmode
- the cipher mode
- Returns:
keyAvailable
public boolean keyAvailable(java.lang.String keyAlias)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.