|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectme.edwards.des.demo.Submitter
public class Submitter
This class allows local Nodes to function without an Election Application.
This class is purely used for demonstration purposes.
It handles submitting Ballots
to a local Node
for
demonstration purposes.
Created on: Dec 30, 2015 at 2:01:45 PM
Field Summary | |
---|---|
private static java.util.HashMap<java.lang.String,java.security.interfaces.ECPublicKey> |
keys
|
Constructor Summary | |
---|---|
Submitter()
|
Method Summary | |
---|---|
static void |
generateDatabase(java.lang.String file,
int users)
Generates a database of key pairs for demonstration purposes. |
static java.security.interfaces.ECPublicKey |
getKey(java.lang.String uuid)
Returns the corresponding ECDSA Public Key for the specified UUID. |
static void |
loadDatabase(java.lang.String file)
Loads the "public.data" database located in the specified directory and loads it for demonstration purposes. |
static void |
submit(java.lang.String file,
Node node,
java.lang.String[][] voteList,
int duration)
Submits Ballots to a local Node for
demonstration purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.HashMap<java.lang.String,java.security.interfaces.ECPublicKey> keys
Constructor Detail |
---|
public Submitter()
Method Detail |
---|
public static void generateDatabase(java.lang.String file, int users) throws java.io.IOException
file
- Directory in which to create databasesusers
- Number of users to generate data for
java.io.IOException
- Thrown if an IOException occurs during file writingpublic static void loadDatabase(java.lang.String file) throws java.io.IOException
Ballots
.
file
- Directory in which to load the "public.data" database file
java.io.IOException
- Thrown if an IOException occurs during file readingpublic static void submit(java.lang.String file, Node node, java.lang.String[][] voteList, int duration) throws java.io.IOException
Ballots
to a local Node
for
demonstration purposes.
file
- Directory in which to load the "private.data" database filenode
- Local Node to submit Ballots tovoteList
- An array representing a list of Vote IDs, each containing list
of possible Votes for that Vote IDduration
- The total amount of time to be taken, in milliseconds
java.io.IOException
- Thrown if an IOException occurs during file readingpublic static java.security.interfaces.ECPublicKey getKey(java.lang.String uuid)
uuid
- UUID of the Ballot
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |