|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vodafone360.people.database.utils.EncryptionUtils
public class EncryptionUtils
EncryptionUtils... This is a utility class for credentials encrypting in database
| Field Summary | |
|---|---|
private static java.lang.String |
ERROR_BADPADDING
error definintions |
private static java.lang.String |
ERROR_ILLEGALBLOCK
error definintions |
private static java.lang.String |
ERROR_INVALIDKEY
error definintions |
private static byte[] |
KEY_BYTES
the hard coded key |
private static javax.crypto.Cipher |
sCipher
the Cipher |
private static javax.crypto.spec.SecretKeySpec |
sKeySpec
secret key |
| Constructor Summary | |
|---|---|
EncryptionUtils()
|
|
| Method Summary | |
|---|---|
private static boolean |
createCipher()
Creation of Cipher |
static java.lang.String |
decryptPassword(byte[] passwordEn)
Decryption of the password. |
static byte[] |
encryptPassword(java.lang.String password)
Encrypting the password. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static javax.crypto.Cipher sCipher
private static javax.crypto.spec.SecretKeySpec sKeySpec
private static final java.lang.String ERROR_INVALIDKEY
private static final java.lang.String ERROR_ILLEGALBLOCK
private static final java.lang.String ERROR_BADPADDING
private static final byte[] KEY_BYTES
| Constructor Detail |
|---|
public EncryptionUtils()
| Method Detail |
|---|
public static byte[] encryptPassword(java.lang.String password)
password - string password
BadPaddingException.
IllegalBlockSizeException.
InvalidKeyException.public static java.lang.String decryptPassword(byte[] passwordEn)
passwordEn - password in bytes
private static boolean createCipher()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
JavaDoc