A
ad
I used the function below to convert a string to a hashed string.
But I found whaterver string I input, I the output hashed sring always have
a "=" character ending.
Is there any problem about this function.
static string StringUtf8ToSha1Base64(string sOri)
{
Byte[] byteOri = UTF8Encoding.UTF8.GetBytes(sOri);
Byte[] byteHash = new SHA1CryptoServiceProvider().ComputeHash(byteOri);
return Convert.ToBase64String(byteHash);
}
But I found whaterver string I input, I the output hashed sring always have
a "=" character ending.
Is there any problem about this function.
static string StringUtf8ToSha1Base64(string sOri)
{
Byte[] byteOri = UTF8Encoding.UTF8.GetBytes(sOri);
Byte[] byteHash = new SHA1CryptoServiceProvider().ComputeHash(byteOri);
return Convert.ToBase64String(byteHash);
}