com.evolveum.midpoint.common.crypto
Interface Protector

All Known Implementing Classes:
AESProtector, KeyStoreConfigurator

public interface Protector


Method Summary
 org.w3c.dom.Element decrypt(ProtectedStringType protectedString)
           
 java.lang.String decryptString(ProtectedStringType protectedString)
           
 ProtectedStringType encrypt(org.w3c.dom.Element plain)
           
 void encrypt(ProtectedStringType ps)
          Encrypts the ProtectedStringType "in place".
 ProtectedStringType encryptString(java.lang.String text)
           
 boolean isEncrypted(ProtectedStringType ps)
          Returns true if protected string contains encrypted data that seems valid.
 

Method Detail

decryptString

java.lang.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
java.lang.IllegalArgumentException - if protectedString argument is null or EncryptedData in protectedString argument is null

decrypt

org.w3c.dom.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
java.lang.IllegalArgumentException - if protectedString argument is null or EncryptedData in protectedString argument is null

encryptString

ProtectedStringType encryptString(java.lang.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(org.w3c.dom.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.



Copyright © 2011 evolveum. All Rights Reserved.