
Explanation
UnicodeEncode UE = new UnicodeEncoding();
byte[] MessageBytes = UE.GetBytes(MesageString);
SHA1Managed SHhash = new SHA1Managed();
byte[] HashValue = SHhash.ComputeHash(MessageBytes);
Example:
byte[] HashValue;
string MessageString = "This is the original message!";
//Create a new instance of the UnicodeEncoding class to
//convert the string into an array of Unicode bytes.
UnicodeEncoding UE = new UnicodeEncoding();
//Convert the string into an array of bytes.
byte[] MessageBytes = UE.GetBytes(MessageString);
//Create a new instance of the SHA1Managed class to create
//the hash value.
SHA1Managed SHhash = new SHA1Managed();
//Create the hash value from the array of bytes.
HashValue = SHhash.ComputeHash(MessageBytes);
Reference: Ensuring Data Integrity with Hash Codes
https://msdn.microsoft.com/en-us/library/f9ax34y5(v=vs.110).aspx