Here's how to create a SHA3_256 hash from a string in CSharp using the System.Security.Cryptography
namespace:
main.cs649 chars24 lines
You can call this method and pass in any string to get its SHA3_256 hash value. Note that we're converting the input string to a byte array using Encoding.UTF8.GetBytes()
before computing the hash, and then converting the hash value (which is also a byte array) to a string using a StringBuilder
.
gistlibby LogSnag