source: branches/eraser6/DefaultPlugins/RNGCrypto.cs @ 176

Revision 176, 475 bytes checked in by lowjoel, 7 years ago (diff)

Added the ISAAC and RNGCryptoServiceProvider CSPRNGs.

Line 
1using System;
2using System.Collections.Generic;
3using System.Text;
4
5using Eraser.Manager;
6using System.Security.Cryptography;
7
8namespace Eraser.DefaultPlugins
9{
10    public class RNGCrypto : PRNG
11    {
12        public override string Name
13        {
14            get { return "RNGCryptoServiceProvider"; }
15        }
16
17        public override void NextBytes(byte[] buffer)
18        {
19            lock (rand)
20                rand.GetBytes(buffer);
21        }
22
23        RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
24    }
25}
Note: See TracBrowser for help on using the repository browser.