CryptoStream 构造函数

定义

重载

CryptoStream(Stream, ICryptoTransform, CryptoStreamMode)

用目标数据流、要使用的转换和流的模式初始化 CryptoStream 类的新实例。

CryptoStream(Stream, ICryptoTransform, CryptoStreamMode, Boolean)

初始化 CryptoStream 类的新实例。

CryptoStream(Stream, ICryptoTransform, CryptoStreamMode)

Source:
CryptoStream.cs
Source:
CryptoStream.cs
Source:
CryptoStream.cs

用目标数据流、要使用的转换和流的模式初始化 CryptoStream 类的新实例。

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
Public Sub New (stream As Stream, transform As ICryptoTransform, mode As CryptoStreamMode)

参数

stream
Stream

对其执行加密转换的流。

transform
ICryptoTransform

要对流执行的加密转换。

例外

stream 无效。

注解

派生自 Stream 的任何对象都可以传递到 参数中 stream 。 任何实现 ICryptoTransform (的对象(如 HashAlgorithm) )都可以传递到 参数中 transform

另请参阅

适用于

CryptoStream(Stream, ICryptoTransform, CryptoStreamMode, Boolean)

Source:
CryptoStream.cs
Source:
CryptoStream.cs
Source:
CryptoStream.cs

初始化 CryptoStream 类的新实例。

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
Public Sub New (stream As Stream, transform As ICryptoTransform, mode As CryptoStreamMode, leaveOpen As Boolean)

参数

stream
Stream

对其执行加密转换的流。

transform
ICryptoTransform

要对流执行的加密转换。

mode
CryptoStreamMode

流的模式。

leaveOpen
Boolean

若要在释放 CryptoStream 对象时不关闭基础流,则为 true;否则为 false

例外

mode 无效。

适用于