|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ERServer.DBase
DBase creates databases, tables and interacts with these through JDBC and SQL. Implementation of the databases is with Hypersonic SQL which is written totally in Java. This implementation was created to support the demoonstration security authorisation system. To implement a new (e.g. biometric) auth system then you *WILL* need to change some SQL. It won't hurt.
Field Summary | |
protected static java.lang.String |
cryptword
|
Constructor Summary | |
DBase()
|
Method Summary | |
protected static boolean |
checkER(java.lang.String name,
java.lang.String code,
java.lang.String pword)
checks Electoral Roll information against that in the database. |
protected static boolean |
confirmVoted(java.lang.String akey)
A little processor intensive and might need tuning but this method finds the user entry in the Electoral Roll that matches the received key and sets it has having voted. |
protected static java.lang.String |
decrypt(java.lang.String data)
Decrypts data pulled from the database returning normal strings. |
protected static void |
doSQL(java.lang.String sqlCommand)
executes the SQL command sent as a parameter and returns the result to DB Console. |
protected static void |
importUsers()
Imports users from a CSV file and inserts them into ERServer database. |
protected static void |
init()
initialises the Hypersonic SQL database. |
protected static boolean |
isSafe(java.lang.String input)
checks String input to make sure it only contains safe characters. |
protected static void |
makeAllKeys()
Goes through all Electoral Roll data to create keys made with key 1 and writes them to a file for export. |
protected static int |
usersVoted()
Counts how many people have voted. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected static java.lang.String cryptword
Constructor Detail |
public DBase()
Method Detail |
protected static void init()
protected static boolean isSafe(java.lang.String input) throws java.lang.Exception
input
- The String to checkprotected static java.lang.String decrypt(java.lang.String data) throws java.lang.Exception
data
- The encrypted stringprotected static int usersVoted() throws java.lang.Exception
protected static boolean checkER(java.lang.String name, java.lang.String code, java.lang.String pword) throws java.lang.Exception
name
- String representing the voter's namecode
- String representing the voter's vote-specific codepword
- String representing the voter's passwordprotected static boolean confirmVoted(java.lang.String akey) throws java.lang.Exception
name
- String representing the voter's namecode
- String representing the voter's vote-specific codepword
- String representing the voter's passwordprotected static void makeAllKeys() throws java.lang.Exception
protected static void importUsers() throws java.lang.Exception
protected static void doSQL(java.lang.String sqlCommand)
sqlCommand
- A string containing SQL
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |