Commit 06187974 authored by gahmad's avatar gahmad

Changes made to update the password in encrypted format


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91707 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bd7f3bd0
......@@ -247,11 +247,11 @@ public class SysGenPassword extends ValidatorEJB implements SysGenPasswordLocal
/**********Modified by Rakesh kumar on 13/04/12 ***********/
//convertIntoSHA256(genPassWord) used to convert Encrypted password
encryptPwd = encryptPassword(genPassWord);
encryptPwd = encryptPassword(genPassWord);
System.out.println("encryptPwd =["+encryptPwd+"]");
//encryptPwdSha = convertIntoSHA256(genPassWord);
//System.out.println("encryptPwdSha =["+encryptPwdSha+"]");
encryptPwdSha = convertIntoSHA256(genPassWord);
System.out.println("encryptPwdSha =["+encryptPwdSha+"]");
if(errCode.trim().length() == 0 || errCode == null )
{
......@@ -261,12 +261,13 @@ public class SysGenPassword extends ValidatorEJB implements SysGenPasswordLocal
/**********Changed by Rakesh kumar on 13/04/12 ***********/
//Sql Query for Encrypted passward
sql= "update users set pass_wd = ? where code = ? " ;
sql= "update users set pass_wd_sha = ?, pass_wd = ? where code = ? " ;
//System.out.println("[SysGenPasswordEJB] SQL..................."+sql);
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, encryptPwd );
pstmt.setString( 2, code );
pstmt.setString( 1, encryptPwdSha );
pstmt.setString( 2, encryptPwd );
pstmt.setString( 3, code );
int upd = pstmt.executeUpdate();
if(upd > 0)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment