Skip to content

Commit 6bda937

Browse files
committed
added IDigestFactory
1 parent 1cbd476 commit 6bda937

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

crypto/src/crypto/IDigestFactory.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
namespace Org.BouncyCastle.Crypto
2+
{
3+
/// <summary>
4+
/// Base interface for operator factories that create stream-based digest calculators.
5+
/// </summary>
6+
/// <typeparam name="A">The algorithm details/parameter type for the digest factory.</typeparam>
7+
public interface IDigestFactory<out A>
8+
{
9+
/// <summary>The algorithm details object for calculators made by this factory.</summary>
10+
A AlgorithmDetails { get ; }
11+
12+
/// <summary>Return the size of the digest associated with this factory.</summary>
13+
/// <returns>The length of the digest produced by this calculators from this factory in bytes.</returns>
14+
int DigestLength { get; }
15+
16+
/// <summary>
17+
/// Create a stream calculator for the digest associated with this factory. The stream
18+
/// calculator is used for the actual operation of entering the data to be digested
19+
/// and producing the digest block.
20+
/// </summary>
21+
/// <returns>A calculator producing an IBlockResult with the final digest in it.</returns>
22+
IStreamCalculator<IBlockResult> CreateCalculator();
23+
}
24+
}

0 commit comments

Comments
 (0)