Skip to content

Instantly share code, notes, and snippets.

@andy51002000
Last active December 7, 2018 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andy51002000/e53dc907285c7b66f651bebccd338c75 to your computer and use it in GitHub Desktop.
Save andy51002000/e53dc907285c7b66f651bebccd338c75 to your computer and use it in GitHub Desktop.
Base64 Encoding In Limited Size 44
using System;
using System.Text;
using System.Security.Cryptography;
public class Program
{
public static void Main()
{
byte[] SHA256Data = Encoding.UTF8.GetBytes("12345678");
SHA256Managed Sha256 = new SHA256Managed();
byte[] Result = Sha256.ComputeHash(SHA256Data);
var x = Convert.ToBase64String(Result);
Console.WriteLine(x);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment