Skip to content

Computed Hash and Password Hash Not Equal #6

Description

@kumarangp

In AuthRepository.cs VerifyPasswordHash() method computed hash and password hash not same when giving correct password.
how to solve this problem ?

using (var hmac = new System.Security.Cryptography.HMACSHA512(passwordSalt)) { var computedHash = hmac.ComputeHash(System.Text.Encoding.UTF8.GetBytes(password)); for(int i = 0; i < computedHash.Length; i++) { if(computedHash[i] != passwordHash[i]) return false; } return true; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions