org.jboss.security.plugins
Class FilePassword
java.lang.Object
org.jboss.security.plugins.FilePassword
- public class FilePassword
- extends java.lang.Object
Read a password in opaque form to a file for use with the FilePassword
accessor in conjunction with the JaasSecurityDomain
{CLASS}org.jboss.security.plugins.FilePassword:password-file
format of the KeyStorePass attribute. The original opaque password file
can be created by running:
java org.jboss.security.plugins.FilePassword salt count password password-file
Running
java org.jboss.security.plugins.FilePassword
will generate a usage message.
Note that this is security by obscurity in that the password is not store
in plaintext, but it can be recovered by simply using the code from this
class.
- See Also:
main(String[])
Method Summary |
static void |
main(java.lang.String[] args)
Write a password in opaque form to a file for use with the FilePassword
accessor in conjunction with the JaasSecurityDomain
{CLASS}org.jboss.security.plugins.FilePassword:password-file
format of the KeyStorePass attribute. |
char[] |
toCharArray()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilePassword
public FilePassword(java.lang.String file)
toCharArray
public char[] toCharArray()
throws java.io.IOException
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Write a password in opaque form to a file for use with the FilePassword
accessor in conjunction with the JaasSecurityDomain
{CLASS}org.jboss.security.plugins.FilePassword:password-file
format of the KeyStorePass attribute.
- Parameters:
args
-
- Throws:
java.lang.Exception