[System] Use GZipStream from corefx
[mono-project.git] / mono / metadata / security.h
blob3d61904d593383aee1d042cf80e64ab5e6b830b0
1 /*
2 * security.c: Security internal calls
4 * Author:
5 * Sebastien Pouliot <sebastien@ximian.com>
7 * (C) 2004 Novell (http://www.novell.com)
8 */
11 #ifndef _MONO_METADATA_SECURITY_H_
12 #define _MONO_METADATA_SECURITY_H_
14 #include <glib.h>
15 #include <mono/metadata/object.h>
16 #include <mono/metadata/object-internals.h>
17 #include <mono/utils/mono-compiler.h>
18 #include <mono/utils/mono-error.h>
19 #include <mono/utils/mono-publib.h>
21 G_BEGIN_DECLS
23 /* System.Environment */
24 extern MonoString* ves_icall_System_Environment_get_UserName (void);
27 /* System.Security.Principal.WindowsIdentity */
28 extern MonoArray* ves_icall_System_Security_Principal_WindowsIdentity_GetRoles (gpointer token);
29 extern gpointer ves_icall_System_Security_Principal_WindowsIdentity_GetCurrentToken (void);
30 extern MonoString* ves_icall_System_Security_Principal_WindowsIdentity_GetTokenName (gpointer token);
31 extern gpointer ves_icall_System_Security_Principal_WindowsIdentity_GetUserToken (MonoString *username);
34 /* System.Security.Principal.WindowsImpersonationContext */
35 extern gboolean ves_icall_System_Security_Principal_WindowsImpersonationContext_CloseToken (gpointer token);
36 extern gpointer ves_icall_System_Security_Principal_WindowsImpersonationContext_DuplicateToken (gpointer token);
37 extern gboolean ves_icall_System_Security_Principal_WindowsImpersonationContext_SetCurrentToken (gpointer token);
38 extern gboolean ves_icall_System_Security_Principal_WindowsImpersonationContext_RevertToSelf (void);
41 /* System.Security.Principal.WindowsPrincipal */
42 extern gboolean ves_icall_System_Security_Principal_WindowsPrincipal_IsMemberOfGroupId (gpointer user, gpointer group);
43 extern gboolean ves_icall_System_Security_Principal_WindowsPrincipal_IsMemberOfGroupName (gpointer user, MonoString *group);
46 /* Mono.Security.Cryptography.KeyPairPersistance */
47 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (MonoString *root);
48 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (MonoString *path);
49 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (MonoString *path);
50 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (MonoString *path);
51 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser (MonoString *path);
54 /* System.Security.Policy.Evidence */
55 MonoBoolean ves_icall_System_Security_Policy_Evidence_IsAuthenticodePresent (MonoReflectionAssemblyHandle refass, MonoError *error);
57 /* System.Security.SecureString */
58 extern void ves_icall_System_Security_SecureString_DecryptInternal (MonoArray *data, MonoObject *scope);
59 extern void ves_icall_System_Security_SecureString_EncryptInternal (MonoArray *data, MonoObject *scope);
60 void invoke_protected_memory_method (MonoArray *data, MonoObject *scope, gboolean encrypt, MonoError *error);
62 G_END_DECLS
64 #endif /* _MONO_METADATA_SECURITY_H_ */