This documentation is archived and is not being maintained.

CryptoStream Constructor

Initializes a new instance of the CryptoStream class with a target data stream, the transformation to use, and the mode of the stream.

[Visual Basic]
Public Sub New( _
   ByVal stream As Stream, _
   ByVal transform As ICryptoTransform, _
   ByVal mode As CryptoStreamMode _
)
[C#]
public CryptoStream(
   Stream stream,
 ICryptoTransform transform,
 CryptoStreamMode mode
);
[C++]
public: CryptoStream(
   Stream* stream,
 ICryptoTransform* transform,
 CryptoStreamMode mode
);
[JScript]
public function CryptoStream(
   stream : Stream,
 transform : ICryptoTransform,
 mode : CryptoStreamMode
);

Parameters

stream
The stream on which to perform the cryptographic transformation.
transform
The cryptographic transformation that is to be performed on the stream.
mode
One of the CryptoStreamMode values.

Remarks

Any object that derives from Stream can be passed into the stream parameter. Any object that implements ICryptoTransform (such as HashAlgorithm) can be passed into the transform parameter.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

CryptoStream Class | CryptoStream Members | System.Security.Cryptography Namespace | Cryptographic Services

Show: