This is because the "ComputeHash" method returns a string, and you are trying to assign this return value to a byte array with:
byte[] encds = MyHash.ComputeHash(Password, "SHA256", NoHash);
There is no implicit conversion for a string to byte [], because there are many different encodings for representing a string as bytes, such as ASCII or UTF8.
You need to explicitly convert the bytes using the appropriate encoding class, for example:
string x = "somestring"; byte[] y = System.Text.Encoding.UTF8.GetBytes(x);
source share