Sha1 generates different hash's from the same string in php when submitting from a different form -


so have weird problem. have login script , type in username , password. once password posted sha1 php function sha1() , compare sha1 version in database. if match logs in. part works fine. have same functionality mobile version, uses different form , different url. after type in password exact same steps, sha1 hash posted different sha1 hash in database. know type them in same each time, don't see why 2 values different. true username / password combination. missing something??

there no reason same text produce different sha1 values.

i suggest log real password values before sha1 generated debug problem.

i suspect may entering passwords different case or padded spaces or other characters reason.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -