Created
September 16, 2016 10:01
-
-
Save DominicFinn/92a217bdabbf77a16ca16f6aca537dc5 to your computer and use it in GitHub Desktop.
Generate a key
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
open System | |
open System.Security.Cryptography | |
let generate() = | |
let key = Array.init 128 (fun i -> byte(i*i)) | |
use cryptoProvider = new RNGCryptoServiceProvider() | |
cryptoProvider.GetBytes(key) | |
Convert.ToBase64String(key) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment