com.ibm.websphere.wim.util

Class PasswordUtil

  • java.lang.Object
    • com.ibm.websphere.wim.util.PasswordUtil


  • public class PasswordUtil
    extends java.lang.Object
    The utility which provides helper functions related with password.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PasswordUtil() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static void erasePassword(byte[] pwdBytes)
      Erase the password byte array by setting its elements to zero.
      static byte[] getByteArrayPassword(java.lang.String password)
      Gets the byte array of the given password from uisng UTF-8 encoding.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PasswordUtil

        public PasswordUtil()
    • Method Detail

      • getByteArrayPassword

        public static byte[] getByteArrayPassword(java.lang.String password)
                                           throws WIMSystemException
        Gets the byte array of the given password from uisng UTF-8 encoding.
        Parameters:
        password - the string of the password to encode.
        Throws:
        WIMSystemException
        Return:
        the byte array representation of the text string
      • erasePassword

        public static void erasePassword(byte[] pwdBytes)
        Erase the password byte array by setting its elements to zero. For security reason, all password byte array should be erased before the references to it is dropped.
        Parameters:
        pwdBytes - The password bypte array to be erased.