I don't know if it's a "spec" or generally agreed upon or linux or just google, but many sites say that the SHA256 hash for an empty string is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 or base64 "ZTNiMGM0NDI5OGZjMWMxNDlhZmJmNGM4OTk2ZmI5MjQyN2FlNDFlNDY0OWI5MzRjYTQ5NTk5MWI3ODUyYjg1NQ=="
However, given the following code in C#
using (var sha256 = SHA256.Create())
{
var contentBytes = System.Text.Encoding.UTF8.GetBytes(content);
byte[] hashedBytes = sha256.ComputeHash(contentBytes);
var hash = Convert.ToBase64String(hashedBytes);
return hash;
}
the base64 value of hash where content=string.empty or content="" will be "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU="
Why the difference?