DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.security.login
Class Utils

java.lang.Object
  extended by org.dlese.dpc.schemedit.security.login.Utils

public class Utils
extends Object

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
static 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 void smudge(byte[] pwd)
          Zero the contents of the specified array.
static void smudge(char[] pwd)
          Zero the contents of the specified array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

public static char[] cryptPassword(char[] pwd)
                            throws Exception
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

DLESE Tools
v1.6.0