Last active
January 21, 2022 16:05
-
-
Save bjoerntx/73d699710b41e2f043fd3621ad41df68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal string GenerateBlockHash() | |
{ | |
SHA256 sha256 = SHA256.Create(); | |
byte[] bInput = | |
Encoding.ASCII.GetBytes($"{TimeStamp}-{PreviousBlockHash ?? ""}-{Data}-{Nonce}"); | |
byte[] bOutput = sha256.ComputeHash(bInput); | |
return Base64UrlEncoder.Encode(bOutput); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment