Class Utils
java.lang.Object
org.dlese.dpc.schemedit.security.login.Utils
Utility methods for com.myjaas.auth.*. All the methods in here are static
so Utils should never be instantiated.
- Version:
- 1.0.3
- Author:
- Andy Armstrong, andy@tagish.com
-
Method Summary
Modifier and TypeMethodDescriptionstatic char[]cryptPassword(char[] pwd) Perform MD5 hashing on the supplied password and return a char array containing the encrypted password as a printable string.static voidsmudge(byte[] pwd) Zero the contents of the specified array.static voidsmudge(char[] pwd) Zero the contents of the specified array.
-
Method Details
-
smudge
public static void smudge(char[] pwd) Zero the contents of the specified array. Typically used to erase temporary storage that has held plaintext passwords so that we don't leave them lying around in memory.- Parameters:
pwd- the array to zero
-
smudge
public static void smudge(byte[] pwd) Zero the contents of the specified array.- Parameters:
pwd- the array to zero
-
cryptPassword
Perform MD5 hashing on the supplied password and return a char array containing the encrypted password as a printable string. The hash is computed on the low 8 bits of each character.- Parameters:
pwd- The password to encrypt- Returns:
- a character array containing a 32 character long hex encoded MD5 hash of the password
- Throws:
Exception
-