public interface Encryptor
Modifier and Type | Method and Description |
---|---|
AlgorithmParameters |
decodeAlgorithmParameters(byte[] encoded)
Decodes encoded cipher algorithm parameters
|
byte[] |
decrypt(String keyAlias,
AlgorithmParameters params,
byte[] input)
Decrypt some bytes
|
InputStream |
decrypt(String keyAlias,
AlgorithmParameters params,
InputStream in)
Decrypt an input stream
|
Object |
decryptObject(String keyAlias,
AlgorithmParameters params,
byte[] input)
Decrypt data as an object
|
Pair<byte[],AlgorithmParameters> |
encrypt(String keyAlias,
AlgorithmParameters params,
byte[] input)
Encrypt some bytes
|
Pair<byte[],AlgorithmParameters> |
encryptObject(String keyAlias,
AlgorithmParameters params,
Object input)
Encrypt an object
|
boolean |
keyAvailable(String keyAlias) |
Serializable |
sealObject(String keyAlias,
AlgorithmParameters params,
Serializable input)
Convenience method to seal on object up cryptographically.
|
Serializable |
unsealObject(String keyAlias,
Serializable input)
Convenience method to unseal on object sealed up cryptographically.
|
Pair<byte[],AlgorithmParameters> encrypt(String keyAlias, AlgorithmParameters params, byte[] input)
keyAlias
- the encryption key aliasinput
- the data to encryptbyte[] decrypt(String keyAlias, AlgorithmParameters params, byte[] input)
keyAlias
- the encryption key aliasinput
- the data to decryptInputStream decrypt(String keyAlias, AlgorithmParameters params, InputStream in)
keyAlias
- the encryption key aliasin
- the data to decryptPair<byte[],AlgorithmParameters> encryptObject(String keyAlias, AlgorithmParameters params, Object input)
keyAlias
- the encryption key aliasinput
- the object to write to bytesObject decryptObject(String keyAlias, AlgorithmParameters params, byte[] input)
keyAlias
- the encryption key aliasinput
- the data to decryptSerializable sealObject(String keyAlias, AlgorithmParameters params, Serializable input)
keyAlias
- the encryption key aliasinput
- the object to encrypt and sealSerializable unsealObject(String keyAlias, Serializable input) throws InvalidKeyException
SealedObject
.keyAlias
- the encryption key aliasinput
- the object to decrypt and unsealIllegalStateException
- if the key alias is not valid and the input is a
SealedObjectInvalidKeyException
AlgorithmParameters decodeAlgorithmParameters(byte[] encoded)
encoded
- the encoded cipher algorithm parametersboolean keyAvailable(String keyAlias)
Copyright © 2005–2015 Alfresco Software. All rights reserved.