语言

NegotiateAuthentication.Wrap 方法

定义

使用签名和加密包装输入消息。

public:
 System::Net::Security::NegotiateAuthenticationStatusCode Wrap(ReadOnlySpan<System::Byte> input, System::Buffers::IBufferWriter<System::Byte> ^ outputWriter, bool requestEncryption, [Runtime::InteropServices::Out] bool % isEncrypted);
public System.Net.Security.NegotiateAuthenticationStatusCode Wrap(ReadOnlySpan<byte> input, System.Buffers.IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted);
member this.Wrap : ReadOnlySpan<byte> * System.Buffers.IBufferWriter<byte> * bool * bool -> System.Net.Security.NegotiateAuthenticationStatusCode
Public Function Wrap (input As ReadOnlySpan(Of Byte), outputWriter As IBufferWriter(Of Byte), requestEncryption As Boolean, ByRef isEncrypted As Boolean) As NegotiateAuthenticationStatusCode

参数

input
ReadOnlySpan<Byte>

要包装的输入消息。

outputWriter
IBufferWriter<Byte>

写入已包装消息的缓冲区写入器。

requestEncryption
Boolean

true 请求加密;否则,为 false.

isEncrypted
Boolean

此方法返回时,包含一个值,该值指示是否在包装中应用了加密。

返回

Completed 成功或失败时的其他 NegotiateAuthenticationStatusCode 值。

例外

身份验证失败或未发生。

注解

与 GSS_Wrap API 一样,身份验证协议实现可以选择替代 requestEncryption 参数中请求的值。 这可能会导致降级或升级保护级别。

适用于