source: trunk/eraser/Eraser.Plugins/ExtensionPoints/IEntropySource.cs @ 2515

Revision 2515, 2.0 KB checked in by lowjoel, 2 years ago (diff)

Set svn:keywords and svn:eol-style on all the source files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Rev URL
Line 
1/*
2 * $Id$
3 * Copyright 2008-2010 The Eraser Project
4 * Original Author: Joel Low <lowjoel@users.sourceforge.net>
5 * Modified By:
6 *
7 * This file is part of Eraser.
8 *
9 * Eraser is free software: you can redistribute it and/or modify it under the
10 * terms of the GNU General Public License as published by the Free Software
11 * Foundation, either version 3 of the License, or (at your option) any later
12 * version.
13 *
14 * Eraser is distributed in the hope that it will be useful, but WITHOUT ANY
15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 *
18 * A copy of the GNU General Public License can be found at
19 * <http://www.gnu.org/licenses/>.
20 */
21
22using System;
23using System.Collections.Generic;
24using System.Linq;
25using System.Text;
26using System.Runtime.InteropServices;
27
28namespace Eraser.Plugins.ExtensionPoints
29{
30    /// <summary>
31    /// Provides an abstract interface to allow multiple sources of entropy into
32    /// the EntropyPoller class.
33    /// </summary>
34    public interface IEntropySource : IRegisterable
35    {
36        /// <summary>
37        /// The name of the entropy source
38        /// </summary>
39        string Name
40        {
41            get;
42        }
43
44        /// <summary>
45        /// Gets a primer to add to the pool when this source is first initialised, to
46        /// further add entropy to the pool.
47        /// </summary>
48        /// <returns>A byte array containing the entropy.</returns>
49        byte[] GetPrimer();
50
51        /// <summary>
52        /// Retrieve entropy from a source which will have slow rate of
53        /// entropy polling.
54        /// </summary>
55        /// <returns></returns>
56        byte[] GetSlowEntropy();
57
58        /// <summary>
59        /// Retrieve entropy from a soruce which will have a fast rate of
60        /// entropy polling.
61        /// </summary>
62        /// <returns></returns>
63        byte[] GetFastEntropy();
64
65        /// <summary>
66        /// Gets entropy from the entropy source. This will be called repetitively.
67        /// </summary>
68        /// <returns>A byte array containing the entropy, both slow rate and fast rate.</returns>
69        byte[] GetEntropy();
70    }
71}
Note: See TracBrowser for help on using the repository browser.