|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.evolveum.midpoint.common.crypto.AESProtector
public class AESProtector
Class that manages encrypted string values. Java Cryptography Extension is needed because this class is using AES-256 for encrypting/decrypting xml data.
| Constructor Summary | |
|---|---|
AESProtector()
|
|
| 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)
|
java.util.List<javax.net.ssl.TrustManager> |
getTrustManagers()
Returns a list of trust managers that will be used to validate communicating party credentials. |
void |
init()
|
boolean |
isEncrypted(ProtectedStringType ps)
Returns true if protected string contains encrypted data that seems valid. |
void |
setEncryptionKeyAlias(java.lang.String encryptionKeyAlias)
|
void |
setKeyStorePassword(java.lang.String keyStorePassword)
|
void |
setKeyStorePath(java.lang.String keyStorePath)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AESProtector()
| Method Detail |
|---|
public void init()
SystemException - if jceks keystore is not available on getKeyStorePathpublic void setEncryptionKeyAlias(java.lang.String encryptionKeyAlias)
encryptionKeyAlias - Alias of the encryption key SecretKey which is used
for encryption
java.lang.IllegalArgumentException - if encryption key digest is null or empty stringpublic void setKeyStorePassword(java.lang.String keyStorePassword)
keyStorePassword -
java.lang.IllegalArgumentException - if keystore password is null stringpublic void setKeyStorePath(java.lang.String keyStorePath)
keyStorePath -
java.lang.IllegalArgumentException - if keystore path is null string
public java.lang.String decryptString(ProtectedStringType protectedString)
throws EncryptionException
decryptString in interface ProtectorEncryptionException - this is thrown probably in case JRE/JDK doesn't have JCE
installed
public org.w3c.dom.Element decrypt(ProtectedStringType protectedString)
throws EncryptionException
decrypt in interface ProtectorElement
EncryptionException - this is thrown probably in case JRE/JDK doesn't have JCE
installed
public ProtectedStringType encryptString(java.lang.String text)
throws EncryptionException
encryptString in interface ProtectorProtectedStringType 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
installed
public ProtectedStringType encrypt(org.w3c.dom.Element plain)
throws EncryptionException
encrypt in interface ProtectorProtectedStringType with encrypted element inside it. If
input argument is null, method returns null.
EncryptionException - this is thrown probably in case JRE/JDK doesn't have JCE
installed
public void encrypt(ProtectedStringType ps)
throws EncryptionException
Protector
encrypt in interface ProtectorEncryptionExceptionpublic boolean isEncrypted(ProtectedStringType ps)
Protector
isEncrypted in interface Protectorpublic java.util.List<javax.net.ssl.TrustManager> getTrustManagers()
Protector
getTrustManagers in interface Protector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||