Sorry above answer is wrong sathiyavathi this only correct please try this solution
Hashing the username, password and secure code together and storing in cookie would be fine because if the cookies get stolen from the computer they are on then thats not your security problem. You have secured the details within a hash etc so you have done your bit.
If the computer gets hacked and the cookies are stolen then its the users own risk to there own system and not yours. Its only like getting hacked and someone finds a file with all your username and passwords stored in there. You have to contact all your accounts and tell them etc and change the user/pass etc.
Try not to think about it too deeply as the user has to take responsibility also for their own security
starting from hashing
Hashing the username, password and secure code together and storing in cookie would be fine because if the cookies get stolen from the computer they are on then thats not your security problem. You have secured the details within a hash etc so you have done your bit.
If the computer gets hacked and the cookies are stolen then its the users own risk to there own system and not yours. Its only like getting hacked and someone finds a file with all your username and passwords stored in there. You have to contact all your accounts and tell them etc and change the user/pass etc.
Try not to think about it too deeply as the user has to take responsibility also for their own security