wicket.util.crypt
Interface ICrypt

All Known Implementing Classes:
AbstractCrypt, NoCrypt, SunJceCrypt, TrivialCrypt

public interface ICrypt

Encryption and decryption implementations are accessed through this interface. It provide some simple means to encrypt and decrypt strings, like passwords etc.. It depends on the implementation itself which algorithms are used to en-/decrypt the data.

If you value the privacy of your websites users, then please consider using a one-way encryption algorithm instead of the Wicket provided ICrypt implementations. The intention of these encryption facilities is to keep passwords private when stored in cookies or in the session.The implementation of the encryption algorithm may change between releases. As such, this interface and its implementations are not intended and should not be used as an encryption facility for persistent values.

As of Wicket 1.2 the methods encrypt and decrypt are deprecated. Consider changing your persistent encryption strategy to be based on a one-way encryption such as a SHA1 hash, not depending on Wicket classes.

Author:
Juergen Donnerstag

Method Summary
 java.lang.String decrypt(java.lang.String text)
          Deprecated.  
 java.lang.String decryptUrlSafe(java.lang.String text)
          Decrypts a string using URL and filename safe Base64 decoding.
 java.lang.String encrypt(java.lang.String plainText)
          Deprecated.  
 java.lang.String encryptUrlSafe(java.lang.String plainText)
          Encrypts a string using URL and filename safe Base64 encoding.
 void setKey(java.lang.String key)
          Sets private encryption key.
 

Method Detail

decrypt

java.lang.String decrypt(java.lang.String text)
Deprecated. 

Decrypts a string.

Parameters:
text - the text to decrypt
Returns:
the decrypted string.

decryptUrlSafe

java.lang.String decryptUrlSafe(java.lang.String text)
Decrypts a string using URL and filename safe Base64 decoding.

Parameters:
text - the text to decrypt
Returns:
the decrypted string.
Since:
1.2

encrypt

java.lang.String encrypt(java.lang.String plainText)
Deprecated. 

Encrypts a string.

Parameters:
plainText -
Returns:
encrypted string

encryptUrlSafe

java.lang.String encryptUrlSafe(java.lang.String plainText)
Encrypts a string using URL and filename safe Base64 encoding.

Parameters:
plainText -
Returns:
encrypted string
Since:
1.2

setKey

void setKey(java.lang.String key)
Sets private encryption key. It depends on the implementation if a default key is applied or an exception is thrown, if no private key has been provided.

Parameters:
key - private key


Copyright © 2004-2007 Wicket developers. All Rights Reserved.