reset password
Author Message
jugal991992
Posts: 9
Posted 05:23 Feb 21, 2015 |
  1. If the cs320.hw1.Homework1User object is not present in Session Scope, your servlet should check for the presence of a "hw2hash" cookie.
    1. If the cookie exists, you should search all Users and compare the hash of every username with the hash stored in the cookie. 

How are we supposed to compare the hash of every username to the hash stored in the cookie? I am unable to do that! we get different unique byte array every time we hash the username!!??!

hippiewho
Posts: 46
Posted 13:43 Feb 21, 2015 |

How did u create the hash? did you use the hashCode() method?

jugal991992
Posts: 9
Posted 13:50 Feb 21, 2015 |

This might help you:

http://stackoverflow.com/questions/3103652/hash-string-via-sha-256-in-java

hippiewho
Posts: 46
Posted 13:25 Feb 22, 2015 |

Did you figure it out? I rehash the Email while in the welcome page but the hash does not match the hash in the cookie.