public static extern int AcceptSecurityContext(CredHandle phCredential, CtxHandle phContext, ref SecBufferDesc pInput, uint fContextReq, uint TargetDataRep, CtxHandle phNewContext, out SecBufferDesc pOutput, out uint pfContextAttr, //managed ulong == 64 bits!!! TimeStamp ptsTimeStamp);
public static extern int AcquireCredentialsHandle( string pszPrincipal, //SEC_CHAR* string pszPackage, //SEC_CHAR* //"Kerberos","NTLM","Negotiative" int fCredentialUse, IntPtr PAuthenticationID, //_LUID AuthenticationID,//pvLogonID, //PLUID IntPtr pAuthData, //PVOID IntPtr pGetKeyFn, //SEC_GET_KEY_FN IntPtr pvGetKeyArgument, //PVOID CredHandle phCredential, //SecHandle //PCtxtHandle ref TimeStamp ptsExpiry); //PTimeStamp //TimeStamp ref
internal static unsafe partial int AcceptSecurityContext( ref CredHandle credentialHandle, void *inContextPtr, SecBufferDesc *inputBuffer, ContextFlags inFlags, Endianness endianness, ref CredHandle outContextPtr, ref SecBufferDesc outputBuffer, ref ContextFlags attributes, out long timeStamp);
internal static unsafe partial int AcquireCredentialsHandleW( string?principal, string moduleName, int usage, void *logonID, SCH_CREDENTIALS *authData, void *keyCallback, void *keyArgument, ref CredHandle handlePtr, out long timeStamp);
internal unsafe static extern int AcquireCredentialsHandleW( [In] string principal, [In] string moduleName, [In] int usage, [In] void *logonID, [In] ref SEC_WINNT_AUTH_IDENTITY_W authdata, [In] void *keyCallback, [In] void *keyArgument, ref CredHandle handlePtr, [Out] out long timeStamp );
internal static extern unsafe int AcceptSecurityContext( ref CredHandle credentialHandle, [In] void *inContextPtr, [In] SecBufferDesc *inputBuffer, [In] ContextFlags inFlags, [In] Endianness endianness, ref CredHandle outContextPtr, [In, Out] ref SecBufferDesc outputBuffer, [In, Out] ref ContextFlags attributes, out long timeStamp );
internal static extern unsafe int AcquireCredentialsHandleW( [In] string principal, [In] string moduleName, [In] int usage, [In] void *logonID, [In] IntPtr zero, [In] void *keyCallback, [In] void *keyArgument, ref CredHandle handlePtr, [Out] out long timeStamp );
internal static extern unsafe int AcquireCredentialsHandleW( [In] string?principal, [In] string moduleName, [In] int usage, [In] void *logonID, [In] SCH_CREDENTIALS *authData, [In] void *keyCallback, [In] void *keyArgument, ref CredHandle handlePtr, [Out] out long timeStamp );
internal unsafe static extern int AcquireCredentialsHandleW( [In] string principal, [In] string moduleName, [In] int usage, [In] void *logonID, [In] ref SCHANNEL_CRED authData, [In] void *keyCallback, [In] void *keyArgument, ref CredHandle handlePtr, [Out] out long timeStamp );
internal static unsafe partial int InitializeSecurityContextW( ref CredHandle credentialHandle, void *inContextPtr, byte *targetName, ContextFlags inFlags, int reservedI, Endianness endianness, SecBufferDesc *inputBuffer, int reservedII, ref CredHandle outContextPtr, ref SecBufferDesc outputBuffer, ref ContextFlags attributes, out long timeStamp);
internal static extern unsafe int InitializeSecurityContextW( ref CredHandle credentialHandle, [In] void *inContextPtr, [In] byte *targetName, [In] ContextFlags inFlags, [In] int reservedI, [In] Endianness endianness, [In] SecBufferDesc *inputBuffer, [In] int reservedII, ref CredHandle outContextPtr, [In, Out] ref SecBufferDesc outputBuffer, [In, Out] ref ContextFlags attributes, out long timeStamp );
internal static extern int SetContextAttributesW( ref CredHandle contextHandle, [In] ContextAttribute attribute, [In] byte[] buffer, [In] int bufferSize);
internal static extern unsafe int QueryContextAttributesW( ref CredHandle contextHandle, [In] ContextAttribute attribute, [In] void *buffer);
internal static partial int EncryptMessage( ref CredHandle contextHandle, uint qualityOfProtection, ref SecBufferDesc inputOutput, uint sequenceNumber);
internal static extern int DeleteSecurityContext( ref CredHandle handlePtr );
internal static extern int FreeCredentialsHandle( ref CredHandle handlePtr );
internal static partial int DeleteSecurityContext( ref CredHandle handlePtr);
internal static extern int EncryptMessage( ref CredHandle contextHandle, [In] uint qualityOfProtection, [In, Out] ref SecBufferDesc inputOutput, [In] uint sequenceNumber );
internal unsafe static extern int AcquireCredentialsHandleW( [In] string principal, [In] string moduleName, [In] int usage, [In] void* logonID, [In] ref SCHANNEL_CRED authData, [In] void* keyCallback, [In] void* keyArgument, ref CredHandle handlePtr, [Out] out long timeStamp );
internal unsafe static extern int SetContextAttributesW( ref CredHandle contextHandle, [In] ContextAttribute attribute, [In] byte[] buffer, [In] int bufferSize);
internal unsafe static extern int AcceptSecurityContext( ref CredHandle credentialHandle, [In] void* inContextPtr, [In] SecBufferDesc* inputBuffer, [In] ContextFlags inFlags, [In] Endianness endianness, ref CredHandle outContextPtr, [In, Out] ref SecBufferDesc outputBuffer, [In, Out] ref ContextFlags attributes, out long timeStamp );
internal static partial int SetContextAttributesW( ref CredHandle contextHandle, ContextAttribute attribute, byte[] buffer, int bufferSize);
internal static unsafe partial int QueryContextAttributesW( ref CredHandle contextHandle, ContextAttribute attribute, void *buffer);
internal static partial int QuerySecurityContextToken( ref CredHandle phContext, out SecurityContextTokenHandle handle);
internal static extern SECURITY_STATUS SetCredentialsAttributesW( [In] ref CredHandle handlePtr, [In] long ulAttribute, [In] ref SecPkgCred_ClientCertPolicy pBuffer, [In] long cbBuffer);
internal static unsafe partial int DecryptMessage( ref CredHandle contextHandle, ref SecBufferDesc inputOutput, uint sequenceNumber, uint *qualityOfProtection);
internal static extern int QuerySecurityContextToken( ref CredHandle phContext, [Out] out SecurityContextTokenHandle handle);
internal static partial int FreeCredentialsHandle( ref CredHandle handlePtr);
internal static extern uint QueryContextAttributes(ref CredHandle contextHandle, [In] ContextAttribute attribute, [In] IntPtr buffer);
internal unsafe static extern int QueryContextAttributesW( ref CredHandle contextHandle, [In] ContextAttribute attribute, [In] void* buffer);
internal unsafe static extern int AcquireCredentialsHandleW( [In] string principal, [In] string moduleName, [In] int usage, [In] void* logonID, [In] ref SEC_WINNT_AUTH_IDENTITY_W authdata, [In] void* keyCallback, [In] void* keyArgument, ref CredHandle handlePtr, [Out] out long timeStamp );
internal static extern unsafe int DecryptMessage( [In] ref CredHandle contextHandle, [In, Out] ref SecBufferDesc inputOutput, [In] uint sequenceNumber, uint *qualityOfProtection );
internal unsafe static extern int InitializeSecurityContextW( ref CredHandle credentialHandle, [In] void* inContextPtr, [In] byte* targetName, [In] ContextFlags inFlags, [In] int reservedI, [In] Endianness endianness, [In] SecBufferDesc* inputBuffer, [In] int reservedII, ref CredHandle outContextPtr, [In, Out] ref SecBufferDesc outputBuffer, [In, Out] ref ContextFlags attributes, out long timeStamp );
internal static extern unsafe int AcquireCredentialsHandleW( [In] string principal, [In] string moduleName, [In] int usage, [In] void* logonID, [In] SafeSspiAuthDataHandle authdata, [In] void* keyCallback, [In] void* keyArgument, ref CredHandle handlePtr, [Out] out long timeStamp );