基于paillier算法的同态加密电子匿名投票系统
使用了paillier算法的同态加密技术,实现了数字匿名投票系统。 这是一个demo。 但实现了加密流程的所有功能。 需要使用数据库。 需要的话请联系我要数据表 mulming@163.com. 同时有密码学的同伴。欢迎相互交流
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-15 09:29 voteSystem
目录 0 2019-01-16 10:41 voteSystemWebContent
目录 0 2019-01-15 09:29 voteSystemWebContentmeta-INF
文件 39 2019-01-15 09:29 voteSystemWebContentmeta-INFMANIFEST.MF
目录 0 2019-01-15 09:29 voteSystemWebContentWEB-INF
目录 0 2019-01-15 09:30 voteSystemWebContentWEB-INFlib
文件 2730866 2018-08-08 13:52 voteSystemWebContentWEB-INFlibxmlbeans-2.6.0.jar
文件 55782 2018-07-23 20:32 voteSystemWebContentWEB-INFlibjackson-annotations-2.8.5.jar
文件 61829 2018-07-23 20:32 voteSystemWebContentWEB-INFlibcommons-logging-1.2.jar
文件 855948 2018-04-18 21:52 voteSystemWebContentWEB-INFlibmysql-connector-java-5.1.26-bin.jar
文件 598978 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-test-4.3.7.RELEASE.jar
文件 827024 2018-07-23 20:32 voteSystemWebContentWEB-INFliblog4j-core-2.3.jar
文件 41077 2018-07-23 20:32 voteSystemWebContentWEB-INFlibslf4j-api-1.7.22.jar
文件 58724 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-aspects-4.3.7.RELEASE.jar
文件 915615 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-webmvc-4.3.7.RELEASE.jar
文件 414240 2018-07-23 20:32 voteSystemWebContentWEB-INFlibjstl-1.2.jar
文件 380004 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-aop-4.3.7.RELEASE.jar
文件 1592620 2018-07-23 20:32 voteSystemWebContentWEB-INFlibmybatis-3.4.2.jar
文件 85324 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-oxm-4.3.7.RELEASE.jar
文件 9990 2018-07-23 20:32 voteSystemWebContentWEB-INFlibslf4j-log4j12-1.7.22.jar
文件 1390360 2018-04-26 15:15 voteSystemWebContentWEB-INFlibpoi-scratchpad-3.17.jar
文件 489884 2018-07-23 20:32 voteSystemWebContentWEB-INFliblog4j-1.2.17.jar
文件 2701171 2018-04-26 14:39 voteSystemWebContentWEB-INFlibpoi-3.17.jar
文件 263286 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-expression-4.3.7.RELEASE.jar
文件 2029794 2018-07-23 20:32 voteSystemWebContentWEB-INFlibant-1.9.6.jar
文件 235656 2018-07-23 20:32 voteSystemWebContentWEB-INFlibognl-3.1.12.jar
文件 1139269 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-context-4.3.7.RELEASE.jar
文件 5924600 2018-04-26 15:16 voteSystemWebContentWEB-INFlibpoi-ooxml-schemas-3.17.jar
文件 817936 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-web-4.3.7.RELEASE.jar
文件 751238 2018-08-08 14:00 voteSystemWebContentWEB-INFlibcommons-collections4-4.1.jar
文件 584207 2018-07-23 21:17 voteSystemWebContentWEB-INFlibsqljdbc4-4.0.jar
............此处省略119个文件信息
package com.vote.controller;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.vote.pojo.User;
import com.vote.pojo.Vote;
import com.vote.service.VoteService;
/**
* @author: mulming
* @ClassName: VoteController
* @date: 2019年1月15日 上午9:33:06
* @Description:TODO(这里用一句话描述这个类的作用)
*/
@Controller
@RequestMapping(“/vote“)
public class VoteController {
@Autowired
private VoteService voteService;
@RequestMapping(“/login.do“)
public String login(User userHttpServletRequest reqHttpSession session) {
User newUser=voteService.longin(user);
if(newUser!=null) {
if(newUser.getRole()==2) {
session.setAttribute(“user“ newUser);
//得到参加竞选的人
List campaigner=voteService.getCampaigner();
req.setAttribute(“campaigner“ campaigner);
return “index“;
}else {
session.setAttribute(“user“ newUser);
List campaigner=voteService.getCampaigner();
req.setAttribute(“campaigner“ campaigner);
return “statistics“;
}
}else {
req.setAttribute(“msg“ “Your account or password is incorrect!“);
return “login/login“;
}
}
@RequestMapping(“/voting.do“)
public String voting(String userNameString idNumHttpServletRequest reqHttpSession session) {
voteService.voting(userName idNum);
List campaigner=voteService.getCampaigner();
req.setAttribute(“campaigner“ campaigner);
return “index“;
}
@RequestMapping(“/votingDetile.do“)
public String votingDetile(int campaignerIdHttpServletRequest req) {
List voted=voteService.getVoteDetileByCID(campaignerId);
req.setAttribute(“voted“ voted);
return “detailOfVote“;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-15 09:29 voteSystem
目录 0 2019-01-16 10:41 voteSystemWebContent
目录 0 2019-01-15 09:29 voteSystemWebContentme
文件 39 2019-01-15 09:29 voteSystemWebContentme
目录 0 2019-01-15 09:29 voteSystemWebContentWEB-INF
目录 0 2019-01-15 09:30 voteSystemWebContentWEB-INFlib
文件 2730866 2018-08-08 13:52 voteSystemWebContentWEB-INFlibxm
文件 55782 2018-07-23 20:32 voteSystemWebContentWEB-INFlibjackson-annotations-2.8.5.jar
文件 61829 2018-07-23 20:32 voteSystemWebContentWEB-INFlibcommons-logging-1.2.jar
文件 855948 2018-04-18 21:52 voteSystemWebContentWEB-INFlibmysql-connector-java-5.1.26-bin.jar
文件 598978 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-test-4.3.7.RELEASE.jar
文件 827024 2018-07-23 20:32 voteSystemWebContentWEB-INFliblog4j-core-2.3.jar
文件 41077 2018-07-23 20:32 voteSystemWebContentWEB-INFlibslf4j-api-1.7.22.jar
文件 58724 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-aspects-4.3.7.RELEASE.jar
文件 915615 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-webmvc-4.3.7.RELEASE.jar
文件 414240 2018-07-23 20:32 voteSystemWebContentWEB-INFlibjstl-1.2.jar
文件 380004 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-aop-4.3.7.RELEASE.jar
文件 1592620 2018-07-23 20:32 voteSystemWebContentWEB-INFlibmybatis-3.4.2.jar
文件 85324 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-oxm-4.3.7.RELEASE.jar
文件 9990 2018-07-23 20:32 voteSystemWebContentWEB-INFlibslf4j-log4j12-1.7.22.jar
文件 1390360 2018-04-26 15:15 voteSystemWebContentWEB-INFlibpoi-scratchpad-3.17.jar
文件 489884 2018-07-23 20:32 voteSystemWebContentWEB-INFliblog4j-1.2.17.jar
文件 2701171 2018-04-26 14:39 voteSystemWebContentWEB-INFlibpoi-3.17.jar
文件 263286 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-ex
文件 2029794 2018-07-23 20:32 voteSystemWebContentWEB-INFlibant-1.9.6.jar
文件 235656 2018-07-23 20:32 voteSystemWebContentWEB-INFlibognl-3.1.12.jar
文件 1139269 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-context-4.3.7.RELEASE.jar
文件 5924600 2018-04-26 15:16 voteSystemWebContentWEB-INFlibpoi-ooxm
文件 817936 2018-07-23 20:32 voteSystemWebContentWEB-INFlibspring-web-4.3.7.RELEASE.jar
文件 751238 2018-08-08 14:00 voteSystemWebContentWEB-INFlibcommons-collections4-4.1.jar
文件 584207 2018-07-23 21:17 voteSystemWebContentWEB-INFlibsqljdbc4-4.0.jar
............此处省略119个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)