Skip to content

Instantly share code, notes, and snippets.

@pieterdv
Created July 1, 2016 15:21
Show Gist options
  • Save pieterdv/390ee2e006807b90d32355eff566417c to your computer and use it in GitHub Desktop.
Save pieterdv/390ee2e006807b90d32355eff566417c to your computer and use it in GitHub Desktop.
Generate random byte string
var b = new byte[32];
new Random().NextBytes(b);
Console.WriteLine(Convert.ToBase64String(b));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment