Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MakeSignature()

static int System.Net.Security.NegotiateStreamPal.MakeSignature ( System::Net::Security::SafeDeleteContext securityContext,
byte[] buffer,
int offset,
int count,
[AllowNull] ref byte[] output )
inlinestaticpackage

Definition at line 127 of file NegotiateStreamPal.cs.

128 {
130 bool flag = System.Net.SSPIWrapper.QueryBlittableContextAttributes(System.Net.GlobalSSPI.SSPIAuth, securityContext, global::Interop.SspiCli.ContextAttribute.SECPKG_ATTR_SIZES, ref attribute);
131 int num = count + attribute.cbMaxSignature;
132 if (output == null || output.Length < num)
133 {
134 output = new byte[num];
135 }
136 Buffer.BlockCopy(buffer, offset, output, attribute.cbMaxSignature, count);
138 Span<System.Net.Security.SecurityBuffer> input = MemoryMarshal.CreateSpan(ref twoSecurityBuffers._item0, 2);
139 input[0] = new System.Net.Security.SecurityBuffer(output, 0, attribute.cbMaxSignature, System.Net.Security.SecurityBufferType.SECBUFFER_TOKEN);
140 input[1] = new System.Net.Security.SecurityBuffer(output, attribute.cbMaxSignature, count, System.Net.Security.SecurityBufferType.SECBUFFER_DATA);
141 int num2 = System.Net.SSPIWrapper.MakeSignature(System.Net.GlobalSSPI.SSPIAuth, securityContext, input, 0u);
142 if (num2 != 0)
143 {
144 System.Net.NetEventSource.Info($"MakeSignature threw error: {num2:x}", null, "MakeSignature");
145 throw new Win32Exception(num2);
146 }
147 return input[0].size + input[1].size;
148 }
static readonly System.Net.SSPIAuthType SSPIAuth
Definition GlobalSSPI.cs:5
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static int MakeSignature(System.Net.ISSPIInterface secModule, System.Net.Security.SafeDeleteContext context, Span< System.Net.Security.SecurityBuffer > input, uint sequenceNumber)
System.Net.Security.SecurityBuffer _item0

References System.Net.Security.TwoSecurityBuffers._item0, System.Buffer.BlockCopy(), System.buffer, System.Net.SecPkgContext_Sizes.cbMaxSignature, System.count, System.Net.NetEventSource.Info(), System.input, System.Net.SSPIWrapper.MakeSignature(), System.offset, and System.Net.GlobalSSPI.SSPIAuth.

Referenced by System.Net.NTAuthentication.MakeSignature().