com.retek.rsm.app.security.service
Class EncryptionUtil

java.lang.Object
  |
  +--com.retek.rsm.app.security.service.EncryptionUtil

public class EncryptionUtil
extends java.lang.Object


Constructor Summary
EncryptionUtil()
           
 
Method Summary
 java.lang.String decrypt(com.retek.platform.service.ClientContext context, EncryptedTextVo encryptedPassword)
          Returns a decrypted String representation of the passed EncryptedTextVo.
 EncryptedTextVo encrypt(com.retek.platform.service.ClientContext context, java.lang.String cleartext, PublicKeyEncryptionStrategyVo publicKeyEncryptionStrategy)
          Returns an instance of EncryptedTextVo, a value object the is an encrypted representation of the passed in data and the algorithm/encryption key.
 PublicKeyEncryptionStrategyVo getClientEncryptionStrategy(PublicKeyEncryptionStrategyVo serverEncryptionStrategy)
          Returns an instance of PublicKeyEncrytpionStrategyVo, a value object that represents the public key, algorithm and encryption provider being used by the CLIENT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptionUtil

public EncryptionUtil()
Method Detail

encrypt

public EncryptedTextVo encrypt(com.retek.platform.service.ClientContext context,
                               java.lang.String cleartext,
                               PublicKeyEncryptionStrategyVo publicKeyEncryptionStrategy)
Returns an instance of EncryptedTextVo, a value object the is an encrypted representation of the passed in data and the algorithm/encryption key.

Parameters:
context - A ClientContext
cleartext - String of unencrypted data
publicKeyEncryptionStrategy - A PublicKeyEncryptionStrategyVo that contains info on how to encrypt.
Returns:
the EncryptedTextVo that encapsulates the encrypted string and Id.

decrypt

public java.lang.String decrypt(com.retek.platform.service.ClientContext context,
                                EncryptedTextVo encryptedPassword)
Returns a decrypted String representation of the passed EncryptedTextVo.

Parameters:
context - A ClientContext
Returns:
the String that is the decrypted encryption text object

getClientEncryptionStrategy

public PublicKeyEncryptionStrategyVo getClientEncryptionStrategy(PublicKeyEncryptionStrategyVo serverEncryptionStrategy)
Returns an instance of PublicKeyEncrytpionStrategyVo, a value object that represents the public key, algorithm and encryption provider being used by the CLIENT.

Returns:
the PublicKeyEncryptionStrategyVo that encapsulates the clients encryption information