Created
August 20, 2012 14:40
-
-
Save wadewegner/3404785 to your computer and use it in GitHub Desktop.
Create a base 64 encoded sequence of 256 bits
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
byte[] b = new byte[32]; | |
RandomNumberGenerator randomNumberGenerator = RandomNumberGenerator.Create(); | |
randomNumberGenerator.GetBytes(b); | |
string result = Convert.ToBase64String(b); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment