public class DefaultEncryptor extends AbstractEncryptor
cipherAlgorithm, cipherProvider, keyProvider, logger
Constructor and Description |
---|
DefaultEncryptor()
Default constructor for IOC
|
Modifier and Type | Method and Description |
---|---|
protected Cipher |
createCipher(int mode,
String algorithm,
String provider,
Key key,
AlgorithmParameters params) |
protected Cipher |
getCachedCipher(String keyAlias,
int mode,
AlgorithmParameters params,
Key key) |
Cipher |
getCipher(String keyAlias,
AlgorithmParameters params,
int mode)
Factory method to be written by implementations to construct and initialize
physical ciphering objects.
|
void |
init() |
boolean |
keyAvailable(String keyAlias) |
void |
setCacheCiphers(boolean cacheCiphers) |
decodeAlgorithmParameters, decrypt, decrypt, decryptObject, encrypt, encryptObject, getCipherAlgorithm, getCipherProvider, getKeyProvider, resetCipher, sealObject, setCipherAlgorithm, setCipherProvider, setKeyProvider, unsealObject
public void init()
init
in class AbstractEncryptor
public void setCacheCiphers(boolean cacheCiphers)
protected Cipher createCipher(int mode, String algorithm, String provider, Key key, AlgorithmParameters params) throws NoSuchAlgorithmException, NoSuchPaddingException, NoSuchProviderException, InvalidKeyException, InvalidAlgorithmParameterException
protected Cipher getCachedCipher(String keyAlias, int mode, AlgorithmParameters params, Key key) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, NoSuchProviderException, InvalidAlgorithmParameterException
public Cipher getCipher(String keyAlias, AlgorithmParameters params, int mode)
AbstractEncryptor
getCipher
in class AbstractEncryptor
keyAlias
- the key aliasparams
- algorithm-specific parametersmode
- the cipher modepublic boolean keyAvailable(String keyAlias)
Copyright © 2005–2020 Alfresco Software. All rights reserved.