Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Security.Cryptography;
- using System.Text;
- namespace CryptoGnome.Hashes
- {
- /// <summary>
- /// SHA256 hash function class.
- /// </summary>
- public class MySHA256 : ISha256
- {
- private SHA256Managed _sha256;
- SHA256Managed ISha256.sha256
- {
- get
- {
- return _sha256;
- }
- set
- {
- value = _sha256;
- }
- }
- // Get the bytes from the hash/encoding.
- public byte[] ShakeSha(string x) => _sha256.ComputeHash(Encoding.UTF8.GetBytes(x)));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement