org.jboss.security
Class Util

java.lang.Object
  extended by org.jboss.security.Util

public class Util
extends Object

Util.

Version:
$Revision: 85945 $
Author:
Scott.Stark@jboss.org, Adrian Brock

Constructor Summary
Util()
           
 
Method Summary
static char[] loadPassword(String passwordCmd)
          Execute a password load command to obtain the char[] contents of a password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

loadPassword

public static char[] loadPassword(String passwordCmd)
                           throws Exception
Execute a password load command to obtain the char[] contents of a password.

Parameters:
passwordCmd - - A command to execute to obtain the plaintext password. The format is one of: '{EXT}...' where the '...' is the exact command line that will be passed to the Runtime.exec(String) method to execute a platform command. The first line of the command output is used as the password. '{CLASS}classname[:ctorargs]' where the '[:ctorargs]' is an optional string delimited by the ':' from the classname that will be passed to the classname ctor. The ctorargs itself is a comma delimited list of strings. The password is obtained from classname by invoking a 'char[] toCharArray()' method if found, otherwise, the 'String toString()' method is used.
Returns:
the password characters
Throws:
Exception


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.