com.j2biz.blogunity.util
Class PasswordEncryptionService

java.lang.Object
  extended bycom.j2biz.blogunity.util.PasswordEncryptionService

public class PasswordEncryptionService
extends Object


Field Summary
static int MD5
           
static int NONE
           
static int SHA
           
 
Constructor Summary
PasswordEncryptionService()
           
 
Method Summary
static String encrypt(String text, int encryptionType)
           
static User encryptPasswordIfNecessary(User user)
          Encrypts user's password if password encryption is activated in system settings.
static String generateActivationCode(User user)
          This method generates textual actiovation code used for user validation.
static String generateRandomPassword(int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
See Also:
Constant Field Values

MD5

public static final int MD5
See Also:
Constant Field Values

SHA

public static final int SHA
See Also:
Constant Field Values
Constructor Detail

PasswordEncryptionService

public PasswordEncryptionService()
Method Detail

encrypt

public static String encrypt(String text,
                             int encryptionType)
                      throws NoSuchProviderException,
                             NoSuchAlgorithmException,
                             UnsupportedEncodingException
Throws:
NoSuchProviderException
NoSuchAlgorithmException
UnsupportedEncodingException

encryptPasswordIfNecessary

public static User encryptPasswordIfNecessary(User user)
                                       throws BlogunityException
Encrypts user's password if password encryption is activated in system settings.

Parameters:
user -
Returns:
Throws:
BlogunityException

generateActivationCode

public static String generateActivationCode(User user)
This method generates textual actiovation code used for user validation.

Parameters:
user -
Returns:

generateRandomPassword

public static String generateRandomPassword(int length)


Copyright (c)j2biz.com