public class ProtectorImpl extends BaseProtector
Constructor and Description |
---|
ProtectorImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
compare(ProtectedStringType a,
ProtectedStringType b) |
protected <T> byte[] |
decryptBytes(ProtectedData<T> protectedData) |
<T> void |
encrypt(ProtectedData<T> protectedData) |
String |
getEncryptionAlgorithm() |
KeyStore |
getKeyStore() |
String |
getKeyStorePath() |
String |
getRequestedJceProviderName() |
String |
getSecretKeyDigest(SecretKey key)
Deprecated.
|
List<TrustManager> |
getTrustManagers()
Returns a list of trust managers that will be used to validate communicating party credentials.
|
<T> void |
hash(ProtectedData<T> protectedData) |
void |
init() |
boolean |
isEncryptedByCurrentKey(EncryptedDataType data) |
void |
setEncryptionAlgorithm(String encryptionAlgorithm) |
void |
setEncryptionKeyAlias(String encryptionKeyAlias) |
void |
setKeyStorePassword(String keyStorePassword) |
void |
setKeyStorePath(String keyStorePath) |
void |
setRequestedJceProviderName(String requestedJceProviderName) |
decrypt, decryptString, encryptString, isEncrypted
public void init()
SystemException
- if jceks keystore is not available on getKeyStorePath()
public String getRequestedJceProviderName()
public void setRequestedJceProviderName(String requestedJceProviderName)
public String getEncryptionAlgorithm()
public void setEncryptionAlgorithm(String encryptionAlgorithm)
protected <T> byte[] decryptBytes(ProtectedData<T> protectedData) throws SchemaException, EncryptionException
decryptBytes
in class BaseProtector
SchemaException
EncryptionException
public <T> void encrypt(ProtectedData<T> protectedData) throws EncryptionException
EncryptionException
@Deprecated public String getSecretKeyDigest(SecretKey key) throws EncryptionException
EncryptionException
public List<TrustManager> getTrustManagers()
Protector
public KeyStore getKeyStore()
public void setEncryptionKeyAlias(String encryptionKeyAlias)
encryptionKeyAlias
- Alias of the encryption key SecretKey
which is used
for encryptionIllegalArgumentException
- if encryption key digest is null or empty stringpublic void setKeyStorePassword(String keyStorePassword)
keyStorePassword
- IllegalArgumentException
- if keystore password is null stringpublic void setKeyStorePath(String keyStorePath)
keyStorePath
- IllegalArgumentException
- if keystore path is null stringpublic String getKeyStorePath()
public <T> void hash(ProtectedData<T> protectedData) throws EncryptionException, SchemaException
EncryptionException
SchemaException
public boolean compare(ProtectedStringType a, ProtectedStringType b) throws EncryptionException, SchemaException
EncryptionException
SchemaException
public boolean isEncryptedByCurrentKey(@NotNull EncryptedDataType data) throws EncryptionException
EncryptionException
Copyright © 2019 Evolveum. All rights reserved.