com.j2biz.blogunity.util
Class PasswordEncryptionService
java.lang.Object
com.j2biz.blogunity.util.PasswordEncryptionService
- public class PasswordEncryptionService
- extends Object
Field Summary |
static int |
MD5
|
static int |
NONE
|
static int |
SHA
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
PasswordEncryptionService
public PasswordEncryptionService()
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