Class BaseProtector
java.lang.Object
com.evolveum.midpoint.prism.impl.crypto.BaseProtector
- All Implemented Interfaces:
Protector
- Direct Known Subclasses:
KeyStoreBasedProtectorImpl
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.prism.crypto.Protector
XMLSEC_ENCRYPTION_ALGORITHM_AES128_CBC, XMLSEC_ENCRYPTION_ALGORITHM_AES256_CBC, XMLSEC_ENCRYPTION_NS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> void
decrypt
(ProtectedData<T> protectedData) protected abstract <T> byte[]
decryptBytes
(ProtectedData<T> protectedData) decryptString
(ProtectedData<String> protectedString) encryptString
(String text) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.prism.crypto.Protector
areEquivalent, compareCleartext, encrypt, getKeyStore, getTrustManagers, hash, isEncryptedByCurrentKey
-
Constructor Details
-
BaseProtector
public BaseProtector()
-
-
Method Details
-
decrypt
- Specified by:
decrypt
in interfaceProtector
- Throws:
EncryptionException
SchemaException
-
decryptBytes
protected abstract <T> byte[] decryptBytes(ProtectedData<T> protectedData) throws SchemaException, EncryptionException - Throws:
SchemaException
EncryptionException
-
decryptString
- Specified by:
decryptString
in interfaceProtector
- Returns:
- decrypted String from protectedString object
- Throws:
EncryptionException
- this is thrown probably in case JRE/JDK doesn't have JCE installed
-
encryptString
- Specified by:
encryptString
in interfaceProtector
- Returns:
ProtectedStringType
with encrypted string inside it. If input argument is null or empty, method returns null.- Throws:
EncryptionException
- this is thrown probably in case JRE/JDK doesn't have JCE installed
-