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