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
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> voiddecrypt(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, waitMethods 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:
decryptin interfaceProtector- Throws:
EncryptionExceptionSchemaException
-
decryptBytes
protected abstract <T> byte[] decryptBytes(ProtectedData<T> protectedData) throws SchemaException, EncryptionException - Throws:
SchemaExceptionEncryptionException
-
decryptString
- Specified by:
decryptStringin 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:
encryptStringin interfaceProtector- Returns:
ProtectedStringTypewith 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
-