You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
787 B
29 lines
787 B
using System;
|
|
|
|
namespace Org.BouncyCastle.Crypto
|
|
{
|
|
/// <summary>
|
|
/// Base interface describing an entropy source for a DRBG.
|
|
/// </summary>
|
|
public interface IEntropySource
|
|
{
|
|
/// <summary>
|
|
/// Return whether or not this entropy source is regarded as prediction resistant.
|
|
/// </summary>
|
|
/// <value><c>true</c> if this instance is prediction resistant; otherwise, <c>false</c>.</value>
|
|
bool IsPredictionResistant { get; }
|
|
|
|
/// <summary>
|
|
/// Return a byte array of entropy.
|
|
/// </summary>
|
|
/// <returns>The entropy bytes.</returns>
|
|
byte[] GetEntropy();
|
|
|
|
/// <summary>
|
|
/// Return the number of bits of entropy this source can produce.
|
|
/// </summary>
|
|
/// <value>The size, in bits, of the return value of getEntropy.</value>
|
|
int EntropySize { get; }
|
|
}
|
|
}
|
|
|
|
|