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

◆ VerifySignature()

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

Definition at line 98 of file NegotiateStreamPal.cs.

99 {
100 if (offset < 0 || offset > ((buffer != null) ? buffer.Length : 0))
101 {
102 System.Net.NetEventSource.Info("Argument 'offset' out of range.", null, "VerifySignature");
103 throw new ArgumentOutOfRangeException("offset");
104 }
105 if (count < 0 || count > ((buffer != null) ? (buffer.Length - offset) : 0))
106 {
107 System.Net.NetEventSource.Info("Argument 'count' out of range.", null, "VerifySignature");
108 throw new ArgumentOutOfRangeException("count");
109 }
111 Span<System.Net.Security.SecurityBuffer> input = MemoryMarshal.CreateSpan(ref twoSecurityBuffers._item0, 2);
112 input[0] = new System.Net.Security.SecurityBuffer(buffer, offset, count, System.Net.Security.SecurityBufferType.SECBUFFER_STREAM);
113 input[1] = new System.Net.Security.SecurityBuffer(0, System.Net.Security.SecurityBufferType.SECBUFFER_DATA);
114 int num = System.Net.SSPIWrapper.VerifySignature(System.Net.GlobalSSPI.SSPIAuth, securityContext, input, 0u);
115 if (num != 0)
116 {
117 System.Net.NetEventSource.Info($"VerifySignature threw error: {num:x}", null, "VerifySignature");
118 throw new Win32Exception(num);
119 }
120 if (input[1].type != System.Net.Security.SecurityBufferType.SECBUFFER_DATA)
121 {
122 throw new System.Net.InternalException(input[1].type);
123 }
124 return input[1].size;
125 }
static readonly System.Net.SSPIAuthType SSPIAuth
Definition GlobalSSPI.cs:5
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static int VerifySignature(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, System.count, System.Net.NetEventSource.Info(), System.input, System.offset, System.Net.GlobalSSPI.SSPIAuth, System.type, and System.Net.SSPIWrapper.VerifySignature().

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