com.silverpeas.authentication
Class CustomCredentialEncryption

java.lang.Object
  extended by com.silverpeas.authentication.CustomCredentialEncryption
All Implemented Interfaces:
CredentialEncryption

public class CustomCredentialEncryption
extends Object
implements CredentialEncryption

Custom encryption algorithm of the user credentials before storing them in cookies.


Constructor Summary
CustomCredentialEncryption()
           
 
Method Summary
 String decode(String encodedText)
          Simple decode for cookie value
 String decode(String str, String key, boolean extraCrypt)
          XOR Decrypt for credential parameters (login and password)
 String encode(String stringToEncode)
          Simple encode for cookie value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomCredentialEncryption

public CustomCredentialEncryption()
Method Detail

encode

public String encode(String stringToEncode)
Simple encode for cookie value

Specified by:
encode in interface CredentialEncryption

decode

public String decode(String encodedText)
Simple decode for cookie value

Specified by:
decode in interface CredentialEncryption
Parameters:
encodedText - : the text to decode.

decode

public String decode(String str,
                     String key,
                     boolean extraCrypt)
XOR Decrypt for credential parameters (login and password)

Specified by:
decode in interface CredentialEncryption
Parameters:
str - : String to decode
key - : key for decoding
extraCrypt - : add simple encode (see decode(String))


Copyright © 2016 Silverpeas. All Rights Reserved.