Bewerken

Share via


NegotiateAuthentication.Wrap Method

Definition

Wraps an input message with a signature and optionally an encryption.

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

Parameters

input
ReadOnlySpan<Byte>

Input message to be wrapped.

outputWriter
IBufferWriter<Byte>

Buffer writter where the wrapped message is written.

requestEncryption
Boolean

true to request encryption; otherwise, false.

isEncrypted
Boolean

When this method returns, contains a value that indicates whether encryption was applied in the wrapping.

Returns

Completed on success, or other NegotiateAuthenticationStatusCode values on failure.

Exceptions

Authentication failed or has not occurred.

Remarks

Like the GSS_Wrap API, the authentication protocol implementation may choose to override the requested value in the requestEncryption parameter. This may result in either downgrade or upgrade of the protection level.

Applies to