-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVoterData.java
76 lines (66 loc) · 1.75 KB
/
VoterData.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import java.io.*;
import java.text.*;
import java.util.*;
import java.net.*;
public class VoterData{
private HashMap<String, VoterInfo> VoterTable = new HashMap<String, VoterInfo>();
public VoterData(){
VoterTable.put("B160779CS", new VoterInfo("B160779CS", "kavitha_pwd", "[email protected]", "d21jkahfds"));
VoterTable.put("B160382CS", new VoterInfo("B160382CS", "varshini_pwd", "[email protected]", "a365zqr301"));
VoterTable.put("b160262cs", new VoterInfo("b160262cs", "pass", "[email protected]", "a365uqr301"));
VoterTable.put("b160008cs", new VoterInfo("b160008cs", "pass", "[email protected]", "a365uqr301"));
}
public HashMap<String, VoterInfo> getVoterTable()
{
return this.VoterTable;
}
}
class VoterInfo{
private String VoterId;
private String password;
private String email;
private String salt;
public String uniqueId;
public boolean uidAssigned;
//constructor
public VoterInfo(String VoterId, String password, String email, String salt)
{
this.password = password;
this.VoterId = VoterId;
this.email = email;
this.salt = salt;
this.uidAssigned = false;
}
public String getVoterId()
{
return this.VoterId;
}
public String getPassword()
{
return this.password;
}
public String getEmail()
{
return this.email;
}
public String getSalt()
{
return this.salt;
}
public boolean getUidAssigned()
{
return this.uidAssigned;
}
public String getUniqueId()
{
return this.uniqueId;
}
public void changeUidAssigned()
{
this.uidAssigned = true;
}
public void setUniqueId(String uniqueId)
{
this.uniqueId = uniqueId;
}
}