Skip to content

Instantly share code, notes, and snippets.

View diegojancic's full-sized avatar

Diego Jancic diegojancic

View GitHub Profile
@diegojancic
diegojancic / TokenGenerator.cs
Created November 3, 2017 14:56
Random string generator, based on
/*
Based on Eric J's answer here: https://stackoverflow.com/a/1344255/72350
- Fixed bias by using 64 characters
- Removed unneeded 'new char[62]' and 'new byte[1]'
- Using GetBytes instead of GetNonZeroBytes
*/
using System.Security.Cryptography;
using System.Text;