Added a main() that allows one to generate an encrypted password given a
username and the plaintext password. git-svn-id: https://samskivert.googlecode.com/svn/trunk@117 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: UserUtil.java,v 1.2 2001/03/02 02:35:17 mdb Exp $
|
// $Id: UserUtil.java,v 1.3 2001/05/26 03:22:49 mdb Exp $
|
||||||
|
|
||||||
package com.samskivert.servlet.user;
|
package com.samskivert.servlet.user;
|
||||||
|
|
||||||
@@ -45,4 +45,15 @@ public class UserUtil
|
|||||||
{
|
{
|
||||||
return Crypt.crypt(username.substring(0, 2), password);
|
return Crypt.crypt(username.substring(0, 2), password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main (String[] args)
|
||||||
|
{
|
||||||
|
if (args.length < 2) {
|
||||||
|
System.err.println("Usage: UserUtil username password");
|
||||||
|
System.exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("Encrypted password: " +
|
||||||
|
encryptPassword(args[0], args[1]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user