public abstract class BaseProtector extends Object implements Protector
Constructor and Description |
---|
BaseProtector() |
Modifier and Type | Method and Description |
---|---|
<T> void |
decrypt(ProtectedData<T> protectedData) |
protected abstract <T> byte[] |
decryptBytes(ProtectedData<T> protectedData) |
String |
decryptString(ProtectedStringType protectedString) |
ProtectedStringType |
encryptString(String text) |
boolean |
isEncrypted(ProtectedStringType ps)
Returns true if protected string contains encrypted data that seems valid.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compare, encrypt, getKeyStore, getTrustManagers
public <T> void decrypt(ProtectedData<T> protectedData) throws EncryptionException, SchemaException
decrypt
in interface Protector
EncryptionException
SchemaException
protected abstract <T> byte[] decryptBytes(ProtectedData<T> protectedData) throws SchemaException, EncryptionException
SchemaException
EncryptionException
public String decryptString(ProtectedStringType protectedString) throws EncryptionException
decryptString
in interface Protector
EncryptionException
- this is thrown probably in case JRE/JDK doesn't have JCE
installedpublic ProtectedStringType encryptString(String text) throws EncryptionException
encryptString
in interface Protector
ProtectedStringType
with encrypted string inside it. If
input argument is null or empty, method returns null.EncryptionException
- this is thrown probably in case JRE/JDK doesn't have JCE
installedpublic boolean isEncrypted(ProtectedStringType ps)
Protector
isEncrypted
in interface Protector
Copyright © 2016 evolveum. All rights reserved.