Skip to content

Instantly share code, notes, and snippets.

View lademone's full-sized avatar

lademone

  • Studio La Démone
  • Québec, Canada
View GitHub Profile
@lademone
lademone / CryptoRandom.cs
Created May 24, 2016 20:15 — forked from niik/CryptoRandom.cs
Buffered CryptoRandom implementation based on Stephen Toub and Shawn Farkas' CryptoRandom
/*
* Original version by Stephen Toub and Shawn Farkas.
* Random pool and thread safety added by Markus Olsson (freakcode.com).
*
* Original source: http://msdn.microsoft.com/en-us/magazine/cc163367.aspx
*
* Some benchmarks (2009-03-18):
*
* Results produced by calling Next() 1 000 000 times on my machine (dual core 3Ghz)
*