Changeset 2359
- Timestamp:
- 11/7/2011 6:58:02 AM (19 months ago)
- Location:
- branches/eraser6/pluginsRewrite/Eraser.Plugins
- Files:
-
- 3 edited
-
ExtensionPoints/ErasureMethod.cs (modified) (1 diff)
-
ExtensionPoints/FileSystem.cs (modified) (3 diffs)
-
Registrars/PrngRegistrar.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/ErasureMethod.cs
r2357 r2359 128 128 129 129 //Randomize. 130 Prng rand = Host.Instance.Prngs [ManagerLibrary.Settings.ActivePrng];130 Prng rand = Host.Instance.Prngs.ActivePrng; 131 131 for (int i = 0; i < result.Length; ++i) 132 132 { -
branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/FileSystem.cs
r2358 r2359 47 47 { 48 48 //Get the PRNG we are going to use 49 Prng prng = Host.Instance.Prngs [ManagerLibrary.Settings.ActivePrng];49 Prng prng = Host.Instance.Prngs.ActivePrng; 50 50 51 51 //Initialsie the base name, if any. … … 110 110 111 111 //Find a random entry. 112 Prng prng = Host.Instance.Prngs [ManagerLibrary.Settings.ActivePrng];112 Prng prng = Host.Instance.Prngs.ActivePrng; 113 113 string result = string.Empty; 114 114 while (result.Length == 0) … … 136 136 List<string> entries = new List<string>( 137 137 ManagerLibrary.Settings.PlausibleDeniabilityFiles); 138 Prng prng = Host.Instance.Prngs [ManagerLibrary.Settings.ActivePrng];138 Prng prng = Host.Instance.Prngs.ActivePrng; 139 139 do 140 140 { -
branches/eraser6/pluginsRewrite/Eraser.Plugins/Registrars/PrngRegistrar.cs
r2357 r2359 42 42 43 43 /// <summary> 44 /// Gets the PRNG that is active. 45 /// </summary> 46 /// <remarks>Client code should set the <see cref="ActivePrngGuid"/> 47 /// member.</remarks> 48 public Prng ActivePrng 49 { 50 get 51 { 52 return this[ActivePrngGuid]; 53 } 54 } 55 56 /// <summary> 57 /// Sets the GUID of the active PRNG. 58 /// </summary> 59 private Guid ActivePrngGuid 60 { 61 get; 62 internal set; 63 } 64 65 /// <summary> 44 66 /// Allows the EntropyThread to get entropy to the PRNG functions as seeds. 45 67 /// </summary> … … 47 69 internal void AddEntropy(byte[] entropy) 48 70 { 49 lock ( ManagerLibrary.Instance.PrngRegistrar)50 foreach (Prng prng in ManagerLibrary.Instance.PrngRegistrar)71 lock (Host.Instance.Prngs) 72 foreach (Prng prng in Host.Instance.Prngs) 51 73 prng.Reseed(entropy); 52 }53 54 /// <summary>55 /// Gets entropy from the EntropyThread.56 /// </summary>57 /// <returns>A buffer of arbitrary length containing random information.</returns>58 internal static byte[] GetEntropy()59 {60 return ManagerLibrary.Instance.EntropySourceRegistrar.Poller.GetPool();61 74 } 62 75 }
Note: See TracChangeset
for help on using the changeset viewer.
