Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Unique identifiers: Base64
private static Random _random = new Random();
public static string Base64Hash()
byte[] buffer = GetRandom(4);
return Convert.ToBase64String(buffer);
// <summary>
// This is used by all Unique identifier examples
// </summary>
public static byte[] GetRandom(int size)
byte[] buffer = new byte[size];
return buffer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.