com.evolveum.midpoint.common.crypto
Interface Protector

All Known Implementing Classes:
AESProtector

public interface Protector


Method Summary
 Element decrypt(ProtectedStringType protectedString)
           
 String decryptString(ProtectedStringType protectedString)
           
 ProtectedStringType encrypt(Element plain)
           
 void encrypt(ProtectedStringType ps)
          Encrypts the ProtectedStringType "in place".
 ProtectedStringType encryptString(String text)
           
 List<TrustManager> getTrustManagers()
          Returns a list of trust managers that will be used to validate communicating party credentials.
 boolean isEncrypted(ProtectedStringType ps)
          Returns true if protected string contains encrypted data that seems valid.
 

Method Detail

decryptString

String decryptString(ProtectedStringType protectedString)
                     throws EncryptionException
Parameters:
protectedString -
Returns:
decrypted String from protectedString object
Throws:
EncryptionException - this is thrown probably in case JRE/JDK doesn't have JCE installed
IllegalArgumentException - if protectedString argument is null or EncryptedData in protectedString argument is null

decrypt

Element decrypt(ProtectedStringType protectedString)
                throws EncryptionException
Parameters:
protectedString -
Returns:
decrypted DOM Element
Throws:
EncryptionException - this is thrown probably in case JRE/JDK doesn't have JCE installed
IllegalArgumentException - if protectedString argument is null or EncryptedData in protectedString argument is null

encryptString

ProtectedStringType encryptString(String text)
                                  throws EncryptionException
Parameters:
text -
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

encrypt

ProtectedStringType encrypt(Element plain)
                            throws EncryptionException
Parameters:
plain -
Returns:
ProtectedStringType with encrypted element inside it. If input argument is null, method returns null.
Throws:
EncryptionException - this is thrown probably in case JRE/JDK doesn't have JCE installed

encrypt

void encrypt(ProtectedStringType ps)
             throws EncryptionException
Encrypts the ProtectedStringType "in place".

Parameters:
ps -
Throws:
EncryptionException

isEncrypted

boolean isEncrypted(ProtectedStringType ps)
Returns true if protected string contains encrypted data that seems valid.


getTrustManagers

List<TrustManager> getTrustManagers()
Returns a list of trust managers that will be used to validate communicating party credentials. (e.g. used to validate remote connector connections).



Copyright © 2013 evolveum. All Rights Reserved.