I am trying to convert sha1 hashed password to sha256 hashed password. Can you please guide me how this can be achieved using javascript. I am basically having some sha1 hash passwords which needs to be validated. However, the application only supports sha256.
You cannot do this directly. Hashing functions are designed to be used in only one direction (plain password -> hashed password). There is no way to retrieve the original password from hashed password or to convert a hashed password to use another hashing function without knowing the original password in first place.