software.engine.gui
Class ElectionDataHandler

java.lang.Object
  extended by software.engine.gui.ElectionDataHandler

public class ElectionDataHandler
extends java.lang.Object

Author:
rick

Constructor Summary
ElectionDataHandler(java.lang.String pub, java.lang.String priv, int meeting)
          Creates a new instance of ElectionDataHandler
 
Method Summary
 boolean AddUser(java.lang.String username, java.lang.String password)
           
 void CleanUp()
           
 void GenerateKeyStore()
           
 void GeneratePasswdFile()
           
 int GetKeyFactor()
           
 byte[] getSuper()
           
static void main(java.lang.String[] args)
           
 void ProcessKeys()
           
 void SetKeyFactor(int newFactor)
           
 void SetUserPassList(java.util.Vector<java.lang.String> users, java.util.Vector<java.lang.String> passwords)
           
 java.lang.String sign(java.lang.String str)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElectionDataHandler

public ElectionDataHandler(java.lang.String pub,
                           java.lang.String priv,
                           int meeting)
                    throws java.lang.SecurityException,
                           java.io.IOException,
                           java.lang.Exception
Creates a new instance of ElectionDataHandler

Throws:
java.lang.SecurityException
java.io.IOException
java.lang.Exception
Method Detail

AddUser

public boolean AddUser(java.lang.String username,
                       java.lang.String password)
                throws javax.xml.parsers.ParserConfigurationException,
                       org.xml.sax.SAXException,
                       java.io.IOException,
                       java.security.NoSuchAlgorithmException,
                       java.security.NoSuchProviderException,
                       javax.crypto.NoSuchPaddingException,
                       java.security.InvalidKeyException,
                       javax.crypto.IllegalBlockSizeException,
                       javax.crypto.BadPaddingException
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
javax.crypto.NoSuchPaddingException
java.security.InvalidKeyException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException

CleanUp

public void CleanUp()

ProcessKeys

public void ProcessKeys()
                 throws java.lang.Exception
Throws:
java.lang.Exception

SetKeyFactor

public void SetKeyFactor(int newFactor)

GetKeyFactor

public int GetKeyFactor()
                 throws javax.xml.parsers.ParserConfigurationException,
                        org.xml.sax.SAXException,
                        java.io.IOException
Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException

GenerateKeyStore

public void GenerateKeyStore()
                      throws java.io.IOException,
                             java.security.NoSuchAlgorithmException,
                             java.security.InvalidKeyException,
                             javax.crypto.NoSuchPaddingException,
                             javax.crypto.IllegalBlockSizeException,
                             javax.crypto.BadPaddingException,
                             java.security.NoSuchProviderException
Throws:
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
javax.crypto.NoSuchPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
java.security.NoSuchProviderException

GeneratePasswdFile

public void GeneratePasswdFile()
                        throws java.io.IOException,
                               java.security.NoSuchAlgorithmException,
                               java.security.InvalidKeyException,
                               javax.crypto.NoSuchPaddingException,
                               javax.crypto.IllegalBlockSizeException,
                               javax.crypto.BadPaddingException,
                               javax.xml.parsers.ParserConfigurationException,
                               org.xml.sax.SAXException
Throws:
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
javax.crypto.NoSuchPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException

SetUserPassList

public void SetUserPassList(java.util.Vector<java.lang.String> users,
                            java.util.Vector<java.lang.String> passwords)

main

public static void main(java.lang.String[] args)
                 throws javax.xml.parsers.ParserConfigurationException,
                        java.io.IOException,
                        java.lang.Exception
Throws:
javax.xml.parsers.ParserConfigurationException
java.io.IOException
java.lang.Exception

sign

public java.lang.String sign(java.lang.String str)
                      throws java.security.NoSuchAlgorithmException,
                             java.security.InvalidKeyException,
                             java.security.SignatureException,
                             java.security.NoSuchProviderException
Throws:
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.SignatureException
java.security.NoSuchProviderException

getSuper

public byte[] getSuper()