org.jasig.portlet.emailpreview.security
Class JasyptPBEStringEncryptionServiceImpl

java.lang.Object
  extended by org.jasig.portlet.emailpreview.security.JasyptPBEStringEncryptionServiceImpl
All Implemented Interfaces:
IStringEncryptionService, org.springframework.beans.factory.InitializingBean

public class JasyptPBEStringEncryptionServiceImpl
extends Object
implements IStringEncryptionService, org.springframework.beans.factory.InitializingBean

JasyptPBEStringEncryptionServiceImpl is an implementation of IStringEncryptionService that uses a configurable Jasypt PBEStringEncryptor to perform string encryption and decryption.

Author:
Jen Bourey

Constructor Summary
JasyptPBEStringEncryptionServiceImpl()
           
 
Method Summary
 void afterPropertiesSet()
           
 String decrypt(String cryptotet)
          Decrypt a string
 String encrypt(String plaintext)
          Encrypt a string
 void setStringEncryptor(org.jasypt.encryption.pbe.PBEStringEncryptor encryptor)
          Set the PBEStringEncryptor to be used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JasyptPBEStringEncryptionServiceImpl

public JasyptPBEStringEncryptionServiceImpl()
Method Detail

setStringEncryptor

public void setStringEncryptor(org.jasypt.encryption.pbe.PBEStringEncryptor encryptor)
Set the PBEStringEncryptor to be used

Parameters:
encryptor -

encrypt

public String encrypt(String plaintext)
Encrypt a string

Specified by:
encrypt in interface IStringEncryptionService
Returns:
encrypted version of the plaintext

decrypt

public String decrypt(String cryptotet)
Decrypt a string

Specified by:
decrypt in interface IStringEncryptionService
Returns:
decrypted version of the cryptotext

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


Copyright © 2013 Jasig. All Rights Reserved.