CryptoStream CryptoStream CryptoStream Constructors

Definition

Overloads

CryptoStream(Stream, ICryptoTransform, CryptoStreamMode) CryptoStream(Stream, ICryptoTransform, CryptoStreamMode) CryptoStream(Stream, ICryptoTransform, CryptoStreamMode)

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

CryptoStream(Stream, ICryptoTransform, CryptoStreamMode, Boolean) CryptoStream(Stream, ICryptoTransform, CryptoStreamMode, Boolean) CryptoStream(Stream, ICryptoTransform, CryptoStreamMode, Boolean)

Initializes a new instance of the CryptoStream class.

CryptoStream(Stream, ICryptoTransform, CryptoStreamMode) CryptoStream(Stream, ICryptoTransform, CryptoStreamMode) CryptoStream(Stream, ICryptoTransform, CryptoStreamMode)

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

public:
 CryptoStream(System::IO::Stream ^ stream, System::Security::Cryptography::ICryptoTransform ^ transform, System::Security::Cryptography::CryptoStreamMode mode);
public CryptoStream (System.IO.Stream stream, System.Security.Cryptography.ICryptoTransform transform, System.Security.Cryptography.CryptoStreamMode mode);
new System.Security.Cryptography.CryptoStream : System.IO.Stream * System.Security.Cryptography.ICryptoTransform * System.Security.Cryptography.CryptoStreamMode -> System.Security.Cryptography.CryptoStream

Parameters

stream
Stream Stream Stream

The stream on which to perform the cryptographic transformation.

transform
ICryptoTransform ICryptoTransform ICryptoTransform

The cryptographic transformation that is to be performed on the stream.

Exceptions

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.

See also

CryptoStream(Stream, ICryptoTransform, CryptoStreamMode, Boolean) CryptoStream(Stream, ICryptoTransform, CryptoStreamMode, Boolean) CryptoStream(Stream, ICryptoTransform, CryptoStreamMode, Boolean)

Initializes a new instance of the CryptoStream class.

public:
 CryptoStream(System::IO::Stream ^ stream, System::Security::Cryptography::ICryptoTransform ^ transform, System::Security::Cryptography::CryptoStreamMode mode, bool leaveOpen);
public CryptoStream (System.IO.Stream stream, System.Security.Cryptography.ICryptoTransform transform, System.Security.Cryptography.CryptoStreamMode mode, bool leaveOpen);
new System.Security.Cryptography.CryptoStream : System.IO.Stream * System.Security.Cryptography.ICryptoTransform * System.Security.Cryptography.CryptoStreamMode * bool -> System.Security.Cryptography.CryptoStream

Parameters

stream
Stream Stream Stream

The stream on which to perform the cryptographic transformation.

transform
ICryptoTransform ICryptoTransform ICryptoTransform

The cryptographic transformation that is to be performed on the stream.

mode
CryptoStreamMode CryptoStreamMode CryptoStreamMode

The mode of the stream.

leaveOpen
Boolean Boolean Boolean

true to not close the underlying stream when the CryptoStream object is disposed; otherwise, false.

Exceptions

Applies to