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 參數中的要求值。 這可能會導致降級或升級保護層級。

適用於