public class DefaultEncryptor extends AbstractEncryptor
cipherAlgorithm, cipherProvider, keyProvider, logger| Constructor and Description |
|---|
DefaultEncryptor()
Default constructor for IOC
|
| Modifier and Type | Method and Description |
|---|---|
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) |
decodeAlgorithmParameters, decrypt, decrypt, decryptObject, encrypt, encryptObject, getCipherAlgorithm, getCipherProvider, getKeyProvider, resetCipher, sealObject, setCipherAlgorithm, setCipherProvider, setKeyProvider, unsealObjectpublic void init()
init in class AbstractEncryptorpublic void setCacheCiphers(boolean cacheCiphers)
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
java.security.NoSuchAlgorithmExceptionjavax.crypto.NoSuchPaddingExceptionjava.security.NoSuchProviderExceptionjava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionprotected 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
java.security.InvalidKeyExceptionjava.security.NoSuchAlgorithmExceptionjavax.crypto.NoSuchPaddingExceptionjava.security.NoSuchProviderExceptionjava.security.InvalidAlgorithmParameterExceptionpublic javax.crypto.Cipher getCipher(java.lang.String keyAlias,
java.security.AlgorithmParameters params,
int mode)
AbstractEncryptorgetCipher in class AbstractEncryptorkeyAlias - the key aliasparams - algorithm-specific parametersmode - the cipher modepublic boolean keyAvailable(java.lang.String keyAlias)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.