shoddybattle
Class AccountEditor

java.lang.Object
  extended by shoddybattle.AccountEditor

public class AccountEditor
extends java.lang.Object

This class offers a trivial application for creating a new user account with a specified user level. It should be invoked as follows:

java -cp dist/ShoddyBattle.jar shoddybattle.AccountEditor [PROPERTIES] USER PASSWORD LEVEL

where PROPERTIES is the server properties file to load, USER is the name of the user account to create, PASSWORD is the password (in plain text) to give the user account, and LEVEL is the user level (0, 1, or 2) to assign to the account. If a properties file is not provided then a default of server.properties is presumed.

In the future the functionality of this class should be expanded. At present, the main use of this class is for the installer to create to create an administrator account for the server operator.


Constructor Summary
AccountEditor()
           
 
Method Summary
static java.lang.String getHash(java.lang.String password)
          Return an SHA-1 hash of a password.
static void main(java.lang.String[] args)
          Invoke the account editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountEditor

public AccountEditor()
Method Detail

getHash

public static java.lang.String getHash(java.lang.String password)
                                throws java.security.NoSuchAlgorithmException,
                                       java.io.UnsupportedEncodingException
Return an SHA-1 hash of a password. This method is not especially secure as it could potentially keep the password in memory for quite some time.

Throws:
java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException

main

public static void main(java.lang.String[] args)
Invoke the account editor.