blob: f3d1f0e0df88d686134330aa2533e384942a9bb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
//
// System.Security.Cryptography ICryptoTransform interface
//
// Authors:
// Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu)
//
// Copyright 2001 by Matthew S. Ford.
//
using System.Security.Cryptography;
namespace System.Security.Cryptography {
/// <summary>
/// Crytographic functions that can process a stream of bytes implement this interface.
/// This works by stringing together one or more ICryptoTransform classes with a stream.
/// Data is passed from one to the next without the need of outside buffering/intervention.
/// </summary>
public interface ICryptoTransform {
/// <summary>
/// Whether the function can transform multiple blocks at a time.
/// </summary>
bool CanTransformMultipleBlocks {get;}
/// <summary>
/// Size of input blocks for the function.
/// </summary>
int InputBlockSize {get;}
/// <summary>
/// Size of the output blocks of the function.
/// </summary>
int OutputBlockSize {get;}
/// <summary>
/// FIXME: Process some data. A block at a time? Less than a block at a time?
/// </summary>
int TransformBlock (byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset);
/// <summary>
/// Processes the final part of the data. Also finalizes the function if needed.
/// </summary>
byte[] TransformFinalBlock (byte[] inputBuffer, int inputOffset, int inputCount);
}
}
|