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

Revision 185, 587 bytes checked in by lowjoel, 7 years ago (diff)

Added the GUID field to the PRNG class since it too is plugin based.

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 Guid GUID
18        {
19            get { return new Guid("{6BF35B8E-F37F-476e-B6B2-9994A92C3B0C}"); }
20        }
21
22        public override void NextBytes(byte[] buffer)
23        {
24            lock (rand)
25                rand.GetBytes(buffer);
26        }
27
28        RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
29    }
30}
Note: See TracBrowser for help on using the repository browser.