提高加密安全性

This commit is contained in:
F嘉阳
2018-02-05 21:15:21 +08:00
parent a31a2ea026
commit 3d81836e0e
3 changed files with 3 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ public class LoginController {
@PostMapping("/login/dologin")
public String doLogin(TbUser tbUser)throws Exception{
//加密用户密码
tbUser.setColpassword(new BigInteger(CodingUtil.encryptSHA(tbUser.getColpassword().getBytes())).toString());
tbUser.setColpassword(new BigInteger(CodingUtil.encryptSHA(tbUser.getColpassword().getBytes())).toString(32));
TbUser user = userService.doLoginService(tbUser.getColname(),tbUser.getColpassword());
if (user!=null){
request.getSession().setAttribute(USER_SESSION_KEY,user);