|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.authenticate.PasswordTools
public class PasswordTools
A tool class for handling passwords and authentication
| Constructor Summary | |
|---|---|
PasswordTools()
|
|
| Method Summary | |
|---|---|
static char[] |
createRandom(int length)
Create a random password of length length. |
static byte[] |
decrypt(byte[] bytes)
Decrypt a byte array which was previously encrypted using encrypt. |
static char[] |
decrypt(String value)
Decrypt a string which was previously encrypted using encrypt. |
static byte[] |
encrypt(byte[] bytes)
Encrypt a clear text array of bytes. |
static String |
encrypt(char[] value)
Encrypt a clear text array of chars. |
static String |
hash(char[] password)
A one way hash for a clear text password. |
static void |
initialize(byte[] salt,
char[] passphrase)
Initialize the PasswordTools. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PasswordTools()
| Method Detail |
|---|
public static char[] createRandom(int length)
length.
length -
public static byte[] decrypt(byte[] bytes)
encrypt. Provided the same salt and passphrase are used for
initialization, this method returns the original unencrypted input.
bytes -
bytespublic static char[] decrypt(String value)
encrypt. Provided the same salt and passphrase are used for
initialization, this method returns the original unencrypted input.
value -
valuepublic static byte[] encrypt(byte[] bytes)
bytes -
bytespublic static String encrypt(char[] value)
value -
valuepublic static String hash(char[] password)
password -
public static void initialize(byte[] salt,
char[] passphrase)
PasswordTools.
salt - passphrase -
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||