This commit is contained in:
niko
2026-06-04 11:42:34 +02:00
parent f39ba70a9f
commit e720b98cd1
7488 changed files with 2493818 additions and 0 deletions
@@ -0,0 +1,20 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the actions that are permitted for securable objects.</summary>
// Token: 0x020004A1 RID: 1185
[Flags]
public enum AccessControlActions
{
/// <summary>Specifies no access.</summary>
// Token: 0x04001158 RID: 4440
None = 0,
/// <summary>Specifies read-only access.</summary>
// Token: 0x04001159 RID: 4441
View = 1,
/// <summary>Specifies write-only access.</summary>
// Token: 0x0400115A RID: 4442
Change = 2
}
}
@@ -0,0 +1,28 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the type of access control modification to perform. This enumeration is used by methods of the <see cref="T:System.Security.AccessControl.ObjectSecurity" /> class and its descendents.</summary>
// Token: 0x020004A2 RID: 1186
public enum AccessControlModification
{
/// <summary>Add the specified authorization rule to the access control list (ACL).</summary>
// Token: 0x0400115C RID: 4444
Add,
/// <summary>Remove all authorization rules from the ACL, then add the specified authorization rule to the ACL.</summary>
// Token: 0x0400115D RID: 4445
Set,
/// <summary>Remove authorization rules that contain the same SID as the specified authorization rule from the ACL, and then add the specified authorization rule to the ACL.</summary>
// Token: 0x0400115E RID: 4446
Reset,
/// <summary>Remove authorization rules that contain the same security identifier (SID) and access mask as the specified authorization rule from the ACL.</summary>
// Token: 0x0400115F RID: 4447
Remove,
/// <summary>Remove authorization rules that contain the same SID as the specified authorization rule from the ACL.</summary>
// Token: 0x04001160 RID: 4448
RemoveAll,
/// <summary>Remove authorization rules that exactly match the specified authorization rule from the ACL.</summary>
// Token: 0x04001161 RID: 4449
RemoveSpecific
}
}
@@ -0,0 +1,29 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies which sections of a security descriptor to save or load.</summary>
// Token: 0x020004A3 RID: 1187
[Flags]
public enum AccessControlSections
{
/// <summary>No sections.</summary>
// Token: 0x04001163 RID: 4451
None = 0,
/// <summary>The system access control list (SACL).</summary>
// Token: 0x04001164 RID: 4452
Audit = 1,
/// <summary>The discretionary access control list (DACL).</summary>
// Token: 0x04001165 RID: 4453
Access = 2,
/// <summary>The owner.</summary>
// Token: 0x04001166 RID: 4454
Owner = 4,
/// <summary>The primary group.</summary>
// Token: 0x04001167 RID: 4455
Group = 8,
/// <summary>The entire security descriptor.</summary>
// Token: 0x04001168 RID: 4456
All = 15
}
}
@@ -0,0 +1,16 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies whether an <see cref="T:System.Security.AccessControl.AccessRule" /> object is used to allow or deny access. These values are not flags, and they cannot be combined.</summary>
// Token: 0x020004A4 RID: 1188
public enum AccessControlType
{
/// <summary>The <see cref="T:System.Security.AccessControl.AccessRule" /> object is used to allow access to a secured object.</summary>
// Token: 0x0400116A RID: 4458
Allow,
/// <summary>The <see cref="T:System.Security.AccessControl.AccessRule" /> object is used to deny access to a secured object.</summary>
// Token: 0x0400116B RID: 4459
Deny
}
}
@@ -0,0 +1,53 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a combination of a user's identity, an access mask, and an access control type (allow or deny). An <see cref="T:System.Security.AccessControl.AccessRule" /> object also contains information about the how the rule is inherited by child objects and how that inheritance is propagated.</summary>
// Token: 0x020004A5 RID: 1189
public abstract class AccessRule : AuthorizationRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.AccessRule" /> class by using the specified values.</summary>
/// <param name="identity">The identity to which the access rule applies. This parameter must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">The inheritance properties of the access rule.</param>
/// <param name="propagationFlags">Whether inherited access rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="type">The valid access control type.</param>
/// <exception cref="T:System.ArgumentException">The value of the <paramref name="identity" /> parameter cannot be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />, or the <paramref name="type" /> parameter contains an invalid value.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="accessMask" /> parameter is zero, or the <paramref name="inheritanceFlags" /> or <paramref name="propagationFlags" /> parameters contain unrecognized flag values.</exception>
// Token: 0x06002CA8 RID: 11432 RVA: 0x00092DCC File Offset: 0x00090FCC
protected AccessRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
: base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags)
{
if (!(identity is SecurityIdentifier))
{
throw new ArgumentException("identity");
}
if (type < AccessControlType.Allow || type > AccessControlType.Deny)
{
throw new ArgumentException("type");
}
if (accessMask == 0)
{
throw new ArgumentOutOfRangeException();
}
this.type = type;
}
/// <summary>Gets the <see cref="T:System.Security.AccessControl.AccessControlType" /> value associated with this <see cref="T:System.Security.AccessControl.AccessRule" /> object.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.AccessControlType" /> value associated with this <see cref="T:System.Security.AccessControl.AccessRule" /> object.</returns>
// Token: 0x170008B6 RID: 2230
// (get) Token: 0x06002CA9 RID: 11433 RVA: 0x00092E2C File Offset: 0x0009102C
public AccessControlType AccessControlType
{
get
{
return this.type;
}
}
// Token: 0x0400116C RID: 4460
private AccessControlType type;
}
}
@@ -0,0 +1,66 @@
using System;
using System.Collections;
namespace System.Security.AccessControl
{
/// <summary>Provides the ability to iterate through the access control entries (ACEs) in an access control list (ACL). </summary>
// Token: 0x020004A6 RID: 1190
public sealed class AceEnumerator : IEnumerator
{
// Token: 0x06002CAA RID: 11434 RVA: 0x00092E34 File Offset: 0x00091034
internal AceEnumerator(GenericAcl owner)
{
this.owner = owner;
}
// Token: 0x170008B7 RID: 2231
// (get) Token: 0x06002CAB RID: 11435 RVA: 0x00092E4C File Offset: 0x0009104C
object IEnumerator.Current
{
get
{
return this.Current;
}
}
/// <summary>Gets the current element in the <see cref="T:System.Security.AccessControl.GenericAce" /> collection. This property gets the type-friendly version of the object. </summary>
/// <returns>The current element in the <see cref="T:System.Security.AccessControl.GenericAce" /> collection.</returns>
// Token: 0x170008B8 RID: 2232
// (get) Token: 0x06002CAC RID: 11436 RVA: 0x00092E54 File Offset: 0x00091054
public GenericAce Current
{
get
{
return (this.current >= 0) ? this.owner[this.current] : null;
}
}
/// <summary>Advances the enumerator to the next element of the <see cref="T:System.Security.AccessControl.GenericAce" /> collection.</summary>
/// <returns>true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.</returns>
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created.</exception>
// Token: 0x06002CAD RID: 11437 RVA: 0x00092E7C File Offset: 0x0009107C
public bool MoveNext()
{
if (this.current + 1 == this.owner.Count)
{
return false;
}
this.current++;
return true;
}
/// <summary>Sets the enumerator to its initial position, which is before the first element in the <see cref="T:System.Security.AccessControl.GenericAce" /> collection.</summary>
/// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created.</exception>
// Token: 0x06002CAE RID: 11438 RVA: 0x00092EA8 File Offset: 0x000910A8
public void Reset()
{
this.current = -1;
}
// Token: 0x0400116D RID: 4461
private GenericAcl owner;
// Token: 0x0400116E RID: 4462
private int current = -1;
}
}
@@ -0,0 +1,41 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the inheritance and auditing behavior of an access control entry (ACE).</summary>
// Token: 0x020004A7 RID: 1191
[Flags]
public enum AceFlags : byte
{
/// <summary>No ACE flags are set.</summary>
// Token: 0x04001170 RID: 4464
None = 0,
/// <summary>The access mask is propagated onto child leaf objects.</summary>
// Token: 0x04001171 RID: 4465
ObjectInherit = 1,
/// <summary>The access mask is propagated to child container objects.</summary>
// Token: 0x04001172 RID: 4466
ContainerInherit = 2,
/// <summary>The access checks do not apply to the object; they only apply to its children.</summary>
// Token: 0x04001173 RID: 4467
NoPropagateInherit = 4,
/// <summary>The access mask is propagated only to child objects. This includes both container and leaf child objects.</summary>
// Token: 0x04001174 RID: 4468
InheritOnly = 8,
/// <summary>A logical OR of <see cref="F:System.Security.AccessControl.AceFlags.ObjectInherit" />, <see cref="F:System.Security.AccessControl.AceFlags.ContainerInherit" />, <see cref="F:System.Security.AccessControl.AceFlags.NoPropagateInherit" />, and <see cref="F:System.Security.AccessControl.AceFlags.InheritOnly" />.</summary>
// Token: 0x04001175 RID: 4469
InheritanceFlags = 15,
/// <summary>An ACE is inherited from a parent container rather than being explicitly set for an object.</summary>
// Token: 0x04001176 RID: 4470
Inherited = 16,
/// <summary>Successful access attempts are audited.</summary>
// Token: 0x04001177 RID: 4471
SuccessfulAccess = 64,
/// <summary>Failed access attempts are audited.</summary>
// Token: 0x04001178 RID: 4472
FailedAccess = 128,
/// <summary>All access attempts are audited.</summary>
// Token: 0x04001179 RID: 4473
AuditFlags = 192
}
}
@@ -0,0 +1,22 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the function of an access control entry (ACE).</summary>
// Token: 0x020004A8 RID: 1192
public enum AceQualifier
{
/// <summary>Allow access.</summary>
// Token: 0x0400117B RID: 4475
AccessAllowed,
/// <summary>Deny access.</summary>
// Token: 0x0400117C RID: 4476
AccessDenied,
/// <summary>Cause a system audit.</summary>
// Token: 0x0400117D RID: 4477
SystemAudit,
/// <summary>Cause a system alarm.</summary>
// Token: 0x0400117E RID: 4478
SystemAlarm
}
}
@@ -0,0 +1,64 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Defines the available access control entry (ACE) types.</summary>
// Token: 0x020004A9 RID: 1193
public enum AceType
{
/// <summary>Allows access to an object for a specific trustee identified by an <see cref="T:System.Security.Principal.IdentityReference" /> object.</summary>
// Token: 0x04001180 RID: 4480
AccessAllowed,
/// <summary>Denies access to an object for a specific trustee identified by an <see cref="T:System.Security.Principal.IdentityReference" /> object.</summary>
// Token: 0x04001181 RID: 4481
AccessDenied,
/// <summary>Causes an audit message to be logged when a specified trustee attempts to gain access to an object. The trustee is identified by an <see cref="T:System.Security.Principal.IdentityReference" /> object.</summary>
// Token: 0x04001182 RID: 4482
SystemAudit,
/// <summary>Reserved for future use.</summary>
// Token: 0x04001183 RID: 4483
SystemAlarm,
/// <summary>Defined but never used. Included here for completeness.</summary>
// Token: 0x04001184 RID: 4484
AccessAllowedCompound,
/// <summary>Allows access to an object, property set, or property. The ACE contains a set of access rights, a GUID that identifies the type of object, and an <see cref="T:System.Security.Principal.IdentityReference" /> object that identifies the trustee to whom the system will grant access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects.</summary>
// Token: 0x04001185 RID: 4485
AccessAllowedObject,
/// <summary>Denies access to an object, property set, or property. The ACE contains a set of access rights, a GUID that identifies the type of object, and an <see cref="T:System.Security.Principal.IdentityReference" /> object that identifies the trustee to whom the system will grant access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects.</summary>
// Token: 0x04001186 RID: 4486
AccessDeniedObject,
/// <summary>Causes an audit message to be logged when a specified trustee attempts to gain access to an object or subobjects such as property sets or properties. The ACE contains a set of access rights, a GUID that identifies the type of object or subobject, and an <see cref="T:System.Security.Principal.IdentityReference" /> object that identifies the trustee for whom the system will audit access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects.</summary>
// Token: 0x04001187 RID: 4487
SystemAuditObject,
/// <summary>Reserved for future use.</summary>
// Token: 0x04001188 RID: 4488
SystemAlarmObject,
/// <summary>Allows access to an object for a specific trustee identified by an <see cref="T:System.Security.Principal.IdentityReference" /> object. This ACE type may contain optional callback data. The callback data is a resource managerspecific BLOB that is not interpreted.</summary>
// Token: 0x04001189 RID: 4489
AccessAllowedCallback,
/// <summary>Denies access to an object for a specific trustee identified by an <see cref="T:System.Security.Principal.IdentityReference" /> object. This ACE type can contain optional callback data. The callback data is a resource managerspecific BLOB that is not interpreted.</summary>
// Token: 0x0400118A RID: 4490
AccessDeniedCallback,
/// <summary>Allows access to an object, property set, or property. The ACE contains a set of access rights, a GUID that identifies the type of object, and an <see cref="T:System.Security.Principal.IdentityReference" /> object that identifies the trustee to whom the system will grant access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects. This ACE type may contain optional callback data. The callback data is a resource managerspecific BLOB that is not interpreted.</summary>
// Token: 0x0400118B RID: 4491
AccessAllowedCallbackObject,
/// <summary>Denies access to an object, property set, or property. The ACE contains a set of access rights, a GUID that identifies the type of object, and an <see cref="T:System.Security.Principal.IdentityReference" /> object that identifies the trustee to whom the system will grant access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects. This ACE type can contain optional callback data. The callback data is a resource managerspecific BLOB that is not interpreted.</summary>
// Token: 0x0400118C RID: 4492
AccessDeniedCallbackObject,
/// <summary>Causes an audit message to be logged when a specified trustee attempts to gain access to an object. The trustee is identified by an <see cref="T:System.Security.Principal.IdentityReference" /> object. This ACE type can contain optional callback data. The callback data is a resource managerspecific BLOB that is not interpreted.</summary>
// Token: 0x0400118D RID: 4493
SystemAuditCallback,
/// <summary>Reserved for future use.</summary>
// Token: 0x0400118E RID: 4494
SystemAlarmCallback,
/// <summary>Causes an audit message to be logged when a specified trustee attempts to gain access to an object or subobjects such as property sets or properties. The ACE contains a set of access rights, a GUID that identifies the type of object or subobject, and an <see cref="T:System.Security.Principal.IdentityReference" /> object that identifies the trustee for whom the system will audit access. The ACE also contains a GUID and a set of flags that control inheritance of the ACE by child objects. This ACE type can contain optional callback data. The callback data is a resource managerspecific BLOB that is not interpreted.</summary>
// Token: 0x0400118F RID: 4495
SystemAuditCallbackObject,
/// <summary>Reserved for future use.</summary>
// Token: 0x04001190 RID: 4496
SystemAlarmCallbackObject,
/// <summary>Tracks the maximum defined ACE type in the enumeration.</summary>
// Token: 0x04001191 RID: 4497
MaxDefinedAceType = 16
}
}
@@ -0,0 +1,20 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the conditions for auditing attempts to access a securable object.</summary>
// Token: 0x020004AA RID: 1194
[Flags]
public enum AuditFlags
{
/// <summary>No access attempts are to be audited.</summary>
// Token: 0x04001193 RID: 4499
None = 0,
/// <summary>Successful access attempts are to be audited.</summary>
// Token: 0x04001194 RID: 4500
Success = 1,
/// <summary>Failed access attempts are to be audited.</summary>
// Token: 0x04001195 RID: 4501
Failure = 2
}
}
@@ -0,0 +1,49 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a combination of a user's identity and an access mask. An <see cref="T:System.Security.AccessControl.AuditRule" /> object also contains information about how the rule is inherited by child objects, how that inheritance is propagated, and for what conditions it is audited.</summary>
// Token: 0x020004AB RID: 1195
public abstract class AuditRule : AuthorizationRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.AuditRule" /> class by using the specified values.</summary>
/// <param name="identity">The identity to which the audit rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true to inherit this rule from a parent container.</param>
/// <param name="inheritanceFlags">The inheritance properties of the audit rule.</param>
/// <param name="propagationFlags">Whether inherited audit rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="auditFlags">The conditions for which the rule is audited.</param>
/// <exception cref="T:System.ArgumentException">The value of the <paramref name="identity" /> parameter cannot be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />, or the <paramref name="auditFlags" /> parameter contains an invalid value.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="accessMask" /> parameter is zero, or the <paramref name="inheritanceFlags" /> or <paramref name="propagationFlags" /> parameters contain unrecognized flag values.</exception>
// Token: 0x06002CAF RID: 11439 RVA: 0x00092EB4 File Offset: 0x000910B4
protected AuditRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags auditFlags)
: base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags)
{
if (!(identity is SecurityIdentifier))
{
throw new ArgumentException("identity");
}
if (accessMask == 0)
{
throw new ArgumentOutOfRangeException();
}
this.auditFlags = auditFlags;
}
/// <summary>Gets the audit flags for this audit rule.</summary>
/// <returns>A bitwise combination of the enumeration values. This combination specifies the audit conditions for this audit rule.</returns>
// Token: 0x170008B9 RID: 2233
// (get) Token: 0x06002CB0 RID: 11440 RVA: 0x00092EF0 File Offset: 0x000910F0
public AuditFlags AuditFlags
{
get
{
return this.auditFlags;
}
}
// Token: 0x04001196 RID: 4502
private AuditFlags auditFlags;
}
}
@@ -0,0 +1,116 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Determines access to securable objects. The derived classes <see cref="T:System.Security.AccessControl.AccessRule" /> and <see cref="T:System.Security.AccessControl.AuditRule" /> offer specializations for access and audit functionality.</summary>
// Token: 0x020004AC RID: 1196
public abstract class AuthorizationRule
{
// Token: 0x06002CB1 RID: 11441 RVA: 0x00092EF8 File Offset: 0x000910F8
internal AuthorizationRule()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AuthorizationControl.AccessRule" /> class by using the specified values.</summary>
/// <param name="identity">The identity to which the access rule applies. This parameter must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true to inherit this rule from a parent container.</param>
/// <param name="inheritanceFlags">The inheritance properties of the access rule.</param>
/// <param name="propagationFlags">Whether inherited access rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <exception cref="T:System.ArgumentException">The value of the <paramref name="identity" /> parameter cannot be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="accessMask" /> parameter is zero, or the <paramref name="inheritanceFlags" /> or <paramref name="propagationFlags" /> parameters contain unrecognized flag values.</exception>
// Token: 0x06002CB2 RID: 11442 RVA: 0x00092F00 File Offset: 0x00091100
protected internal AuthorizationRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
if (!(identity is SecurityIdentifier))
{
throw new ArgumentException("identity");
}
if (accessMask == 0)
{
throw new ArgumentOutOfRangeException();
}
this.identity = identity;
this.accessMask = accessMask;
this.isInherited = isInherited;
this.inheritanceFlags = inheritanceFlags;
this.propagationFlags = propagationFlags;
}
/// <summary>Gets the <see cref="T:System.Security.Principal.IdentityReference" /> to which this rule applies.</summary>
/// <returns>The <see cref="T:System.Security.Principal.IdentityReference" /> to which this rule applies.</returns>
// Token: 0x170008BA RID: 2234
// (get) Token: 0x06002CB3 RID: 11443 RVA: 0x00092F5C File Offset: 0x0009115C
public IdentityReference IdentityReference
{
get
{
return this.identity;
}
}
/// <summary>Gets the value of flags that determine how this rule is inherited by child objects.</summary>
/// <returns>A bitwise combination of the enumeration values.</returns>
// Token: 0x170008BB RID: 2235
// (get) Token: 0x06002CB4 RID: 11444 RVA: 0x00092F64 File Offset: 0x00091164
public InheritanceFlags InheritanceFlags
{
get
{
return this.inheritanceFlags;
}
}
/// <summary>Gets a value indicating whether this rule is explicitly set or is inherited from a parent container object.</summary>
/// <returns>true if this rule is not explicitly set but is instead inherited from a parent container.</returns>
// Token: 0x170008BC RID: 2236
// (get) Token: 0x06002CB5 RID: 11445 RVA: 0x00092F6C File Offset: 0x0009116C
public bool IsInherited
{
get
{
return this.isInherited;
}
}
/// <summary>Gets the value of the propagation flags, which determine how inheritance of this rule is propagated to child objects. This property is significant only when the value of the <see cref="T:System.Security.AccessControl.InheritanceFlags" /> enumeration is not <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</summary>
/// <returns>A bitwise combination of the enumeration values.</returns>
// Token: 0x170008BD RID: 2237
// (get) Token: 0x06002CB6 RID: 11446 RVA: 0x00092F74 File Offset: 0x00091174
public PropagationFlags PropagationFlags
{
get
{
return this.propagationFlags;
}
}
/// <summary>Gets the access mask for this rule.</summary>
/// <returns>The access mask for this rule.</returns>
// Token: 0x170008BE RID: 2238
// (get) Token: 0x06002CB7 RID: 11447 RVA: 0x00092F7C File Offset: 0x0009117C
protected internal int AccessMask
{
get
{
return this.accessMask;
}
}
// Token: 0x04001197 RID: 4503
private IdentityReference identity;
// Token: 0x04001198 RID: 4504
private int accessMask;
// Token: 0x04001199 RID: 4505
private bool isInherited;
// Token: 0x0400119A RID: 4506
private InheritanceFlags inheritanceFlags;
// Token: 0x0400119B RID: 4507
private PropagationFlags propagationFlags;
}
}
@@ -0,0 +1,37 @@
using System;
using System.Collections;
namespace System.Security.AccessControl
{
/// <summary>Represents a collection of <see cref="T:System.Security.AccessControl.AuthorizationRule" /> objects.</summary>
// Token: 0x020004AD RID: 1197
public sealed class AuthorizationRuleCollection : ReadOnlyCollectionBase
{
// Token: 0x06002CB8 RID: 11448 RVA: 0x00092F84 File Offset: 0x00091184
private AuthorizationRuleCollection(AuthorizationRule[] rules)
{
base.InnerList.AddRange(rules);
}
/// <summary>Gets the <see cref="T:System.Security.AccessControl.AuthorizationRule" /> object at the specified index of the collection.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.AuthorizationRule" /> object at the specified index.</returns>
/// <param name="index">The zero-based index of the <see cref="T:System.Security.AccessControl.AuthorizationRule" /> object to get.</param>
// Token: 0x170008BF RID: 2239
public AuthorizationRule this[int index]
{
get
{
return (AuthorizationRule)base.InnerList[index];
}
}
/// <summary>Copies the contents of the collection to an array.</summary>
/// <param name="rules">An array to which to copy the contents of the collection.</param>
/// <param name="index">The zero-based index from which to begin copying.</param>
// Token: 0x06002CBA RID: 11450 RVA: 0x00092FAC File Offset: 0x000911AC
public void CopyTo(AuthorizationRule[] rules, int index)
{
base.InnerList.CopyTo(rules, index);
}
}
}
@@ -0,0 +1,60 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents an access control entry (ACE).</summary>
// Token: 0x020004AE RID: 1198
public sealed class CommonAce : QualifiedAce
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CommonAce" /> class.</summary>
/// <param name="flags">Flags that specify information about the inheritance, inheritance propagation, and auditing conditions for the new access control entry (ACE).</param>
/// <param name="qualifier">The use of the new ACE.</param>
/// <param name="accessMask">The access mask for the ACE.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> associated with the new ACE.</param>
/// <param name="isCallback">true to specify that the new ACE is a callback type ACE.</param>
/// <param name="opaque">Opaque data associated with the new ACE. Opaque data is allowed only for callback ACE types. The length of this array must not be greater than the return value of the <see cref="M:System.Security.AccessControl.CommonAce.MaxOpaqueLength(System.Boolean)" /> method.</param>
// Token: 0x06002CBB RID: 11451 RVA: 0x00092FBC File Offset: 0x000911BC
public CommonAce(AceFlags flags, AceQualifier qualifier, int accessMask, SecurityIdentifier sid, bool isCallback, byte[] opaque)
: base(InheritanceFlags.None, PropagationFlags.None, qualifier, isCallback, opaque)
{
base.AccessMask = accessMask;
base.SecurityIdentifier = sid;
}
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.CommonAce" /> object. Use this length with the <see cref="M:System.Security.AccessControl.CommonAce.GetBinaryForm(System.Byte[],System.Int32)" /> method before marshaling the ACL into a binary array.</summary>
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.CommonAce" /> object.</returns>
// Token: 0x170008C0 RID: 2240
// (get) Token: 0x06002CBC RID: 11452 RVA: 0x00092FDC File Offset: 0x000911DC
[MonoTODO]
public override int BinaryLength
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Marshals the contents of the <see cref="T:System.Security.AccessControl.CommonAce" /> object into the specified byte array beginning at the specified offset.</summary>
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl.CommonAce" /> object is marshaled.</param>
/// <param name="offset">The offset at which to start marshaling.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl.CommonAce" /> to be copied into the <paramref name="binaryForm" /> array.</exception>
// Token: 0x06002CBD RID: 11453 RVA: 0x00092FE4 File Offset: 0x000911E4
[MonoTODO]
public override void GetBinaryForm(byte[] binaryForm, int offset)
{
throw new NotImplementedException();
}
/// <summary>Gets the maximum allowed length of an opaque data BLOB for callback access control entries (ACEs).</summary>
/// <returns>The allowed length of an opaque data BLOB.</returns>
/// <param name="isCallback">true to specify that the <see cref="T:System.Security.AccessControl.CommonAce" /> object is a callback ACE type.</param>
// Token: 0x06002CBE RID: 11454 RVA: 0x00092FEC File Offset: 0x000911EC
[MonoTODO]
public static int MaxOpaqueLength(bool isCallback)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,158 @@
using System;
using System.Collections.Generic;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents an access control list (ACL) and is the base class for the <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> and <see cref="T:System.Security.AccessControl.SystemAcl" /> classes.</summary>
// Token: 0x020004AF RID: 1199
public abstract class CommonAcl : GenericAcl
{
// Token: 0x06002CBF RID: 11455 RVA: 0x00092FF4 File Offset: 0x000911F4
internal CommonAcl(bool isContainer, bool isDS, byte revision)
: this(isContainer, isDS, revision, 10)
{
}
// Token: 0x06002CC0 RID: 11456 RVA: 0x00093004 File Offset: 0x00091204
internal CommonAcl(bool isContainer, bool isDS, byte revision, int capacity)
{
this.is_container = isContainer;
this.is_ds = isDS;
this.revision = revision;
this.list = new List<GenericAce>(capacity);
}
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.CommonAcl" /> object. This length should be used before marshaling the access control list (ACL) into a binary array by using the <see cref="M:System.Security.AccessControl.CommonAcl.GetBinaryForm" /> method.</summary>
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.CommonAcl" /> object.</returns>
// Token: 0x170008C1 RID: 2241
// (get) Token: 0x06002CC1 RID: 11457 RVA: 0x0009303C File Offset: 0x0009123C
[MonoTODO]
public sealed override int BinaryLength
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets the number of access control entries (ACEs) in the current <see cref="T:System.Security.AccessControl.CommonAcl" /> object.</summary>
/// <returns>The number of ACEs in the current <see cref="T:System.Security.AccessControl.CommonAcl" /> object.</returns>
// Token: 0x170008C2 RID: 2242
// (get) Token: 0x06002CC2 RID: 11458 RVA: 0x00093044 File Offset: 0x00091244
public sealed override int Count
{
get
{
return this.list.Count;
}
}
/// <summary>Gets a Boolean value that specifies whether the access control entries (ACEs) in the current <see cref="T:System.Security.AccessControl.CommonAcl" /> object are in canonical order.</summary>
/// <returns>true if the ACEs in the current <see cref="T:System.Security.AccessControl.CommonAcl" /> object are in canonical order; otherwise, false.</returns>
// Token: 0x170008C3 RID: 2243
// (get) Token: 0x06002CC3 RID: 11459 RVA: 0x00093054 File Offset: 0x00091254
[MonoTODO]
public bool IsCanonical
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Sets whether the <see cref="T:System.Security.AccessControl.CommonAcl" /> object is a container. </summary>
/// <returns>true if the current <see cref="T:System.Security.AccessControl.CommonAcl" /> object is a container.</returns>
// Token: 0x170008C4 RID: 2244
// (get) Token: 0x06002CC4 RID: 11460 RVA: 0x0009305C File Offset: 0x0009125C
public bool IsContainer
{
get
{
return this.is_container;
}
}
/// <summary>Sets whether the current <see cref="T:System.Security.AccessControl.CommonAcl" /> object is a directory object access control list (ACL).</summary>
/// <returns>true if the current <see cref="T:System.Security.AccessControl.CommonAcl" /> object is a directory object ACL.</returns>
// Token: 0x170008C5 RID: 2245
// (get) Token: 0x06002CC5 RID: 11461 RVA: 0x00093064 File Offset: 0x00091264
public bool IsDS
{
get
{
return this.is_ds;
}
}
/// <summary>Gets or sets the <see cref="T:System.Security.AccessControl.CommonAce" /> at the specified index.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.CommonAce" /> at the specified index.</returns>
/// <param name="index">The zero-based index of the <see cref="T:System.Security.AccessControl.CommonAce" /> to get or set.</param>
// Token: 0x170008C6 RID: 2246
public sealed override GenericAce this[int index]
{
get
{
return this.list[index];
}
set
{
this.list[index] = value;
}
}
/// <summary>Gets the revision level of the <see cref="T:System.Security.AccessControl.CommonAcl" />.</summary>
/// <returns>A byte value that specifies the revision level of the <see cref="T:System.Security.AccessControl.CommonAcl" />.</returns>
// Token: 0x170008C7 RID: 2247
// (get) Token: 0x06002CC8 RID: 11464 RVA: 0x0009308C File Offset: 0x0009128C
public sealed override byte Revision
{
get
{
return this.revision;
}
}
/// <summary>Marshals the contents of the <see cref="T:System.Security.AccessControl.CommonAcl" /> object into the specified byte array beginning at the specified offset.</summary>
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl.CommonAcl" /> is marshaled.</param>
/// <param name="offset">The offset at which to start marshaling.</param>
// Token: 0x06002CC9 RID: 11465 RVA: 0x00093094 File Offset: 0x00091294
[MonoTODO]
public sealed override void GetBinaryForm(byte[] binaryForm, int offset)
{
throw new NotImplementedException();
}
/// <summary>Removes all access control entries (ACEs) contained by this <see cref="T:System.Security.AccessControl.CommonAcl" /> object that are associated with the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</summary>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> object to check for.</param>
// Token: 0x06002CCA RID: 11466 RVA: 0x0009309C File Offset: 0x0009129C
[MonoTODO]
public void Purge(SecurityIdentifier sid)
{
throw new NotImplementedException();
}
/// <summary>Removes all inherited access control entries (ACEs) from this <see cref="T:System.Security.AccessControl.CommonAcl" /> object.</summary>
// Token: 0x06002CCB RID: 11467 RVA: 0x000930A4 File Offset: 0x000912A4
[MonoTODO]
public void RemoveInheritedAces()
{
throw new NotImplementedException();
}
// Token: 0x0400119C RID: 4508
private const int default_capacity = 10;
// Token: 0x0400119D RID: 4509
private bool is_container;
// Token: 0x0400119E RID: 4510
private bool is_ds;
// Token: 0x0400119F RID: 4511
private byte revision;
// Token: 0x040011A0 RID: 4512
private List<GenericAce> list;
}
}
@@ -0,0 +1,225 @@
using System;
using System.Collections.Generic;
namespace System.Security.AccessControl
{
/// <summary>Controls access to objects without direct manipulation of access control lists (ACLs). This class is the abstract base class for the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> class.</summary>
// Token: 0x020004B0 RID: 1200
[MonoTODO("required for NativeObjectSecurity - implementation is missing")]
public abstract class CommonObjectSecurity : ObjectSecurity
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> class.</summary>
/// <param name="isContainer">true if the new object is a container object.</param>
// Token: 0x06002CCC RID: 11468 RVA: 0x000930AC File Offset: 0x000912AC
protected CommonObjectSecurity(bool isContainer)
: base(isContainer, false)
{
}
/// <summary>Gets a collection of the access rules associated with the specified security identifier.</summary>
/// <returns>The collection of access rules associated with the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</returns>
/// <param name="includeExplicit">true to include access rules explicitly set for the object.</param>
/// <param name="includeInherited">true to include inherited access rules.</param>
/// <param name="targetType">Specifies whether the security identifier for which to retrieve access rules is of type T:System.Security.Principal.SecurityIdentifier or type T:System.Security.Principal.NTAccount. The value of this parameter must be a type that can be translated to the <see cref="T:System.Security.Principal.SecurityIdentifier" /> type.</param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// Token: 0x06002CCD RID: 11469 RVA: 0x000930CC File Offset: 0x000912CC
public AuthorizationRuleCollection GetAccessRules(bool includeExplicit, bool includeInherited, Type targetType)
{
throw new NotImplementedException();
}
/// <summary>Gets a collection of the audit rules associated with the specified security identifier.</summary>
/// <returns>The collection of audit rules associated with the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</returns>
/// <param name="includeExplicit">true to include audit rules explicitly set for the object.</param>
/// <param name="includeInherited">true to include inherited audit rules.</param>
/// <param name="targetType">The security identifier for which to retrieve audit rules. This must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// Token: 0x06002CCE RID: 11470 RVA: 0x000930D4 File Offset: 0x000912D4
public AuthorizationRuleCollection GetAuditRules(bool includeExplicit, bool includeInherited, Type targetType)
{
throw new NotImplementedException();
}
/// <summary>Adds the specified access rule to the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <param name="rule">The access rule to add.</param>
// Token: 0x06002CCF RID: 11471 RVA: 0x000930DC File Offset: 0x000912DC
protected void AddAccessRule(AccessRule rule)
{
this.access_rules.Add(rule);
base.AccessRulesModified = true;
}
/// <summary>Removes access rules that contain the same security identifier and access mask as the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <returns>true if the access rule was successfully removed; otherwise, false.</returns>
/// <param name="rule">The access rule to remove.</param>
// Token: 0x06002CD0 RID: 11472 RVA: 0x000930F4 File Offset: 0x000912F4
protected bool RemoveAccessRule(AccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules that have the same security identifier as the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <param name="rule">The access rule to remove.</param>
// Token: 0x06002CD1 RID: 11473 RVA: 0x000930FC File Offset: 0x000912FC
protected void RemoveAccessRuleAll(AccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules that exactly match the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <param name="rule">The access rule to remove.</param>
// Token: 0x06002CD2 RID: 11474 RVA: 0x00093104 File Offset: 0x00091304
protected void RemoveAccessRuleSpecific(AccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules in the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object and then adds the specified access rule.</summary>
/// <param name="rule">The access rule to reset.</param>
// Token: 0x06002CD3 RID: 11475 RVA: 0x0009310C File Offset: 0x0009130C
protected void ResetAccessRule(AccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules that contain the same security identifier and qualifier as the specified access rule in the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object and then adds the specified access rule.</summary>
/// <param name="rule">The access rule to set.</param>
// Token: 0x06002CD4 RID: 11476 RVA: 0x00093114 File Offset: 0x00091314
protected void SetAccessRule(AccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Applies the specified modification to the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <returns>true if the DACL is successfully modified; otherwise, false.</returns>
/// <param name="modification">The modification to apply to the DACL.</param>
/// <param name="rule">The access rule to modify.</param>
/// <param name="modified">true if the DACL is successfully modified; otherwise, false.</param>
// Token: 0x06002CD5 RID: 11477 RVA: 0x0009311C File Offset: 0x0009131C
protected override bool ModifyAccess(AccessControlModification modification, AccessRule rule, out bool modified)
{
foreach (AccessRule accessRule in this.access_rules)
{
if (rule == accessRule)
{
switch (modification)
{
case AccessControlModification.Add:
this.AddAccessRule(rule);
break;
case AccessControlModification.Set:
this.SetAccessRule(rule);
break;
case AccessControlModification.Reset:
this.ResetAccessRule(rule);
break;
case AccessControlModification.Remove:
this.RemoveAccessRule(rule);
break;
case AccessControlModification.RemoveAll:
this.RemoveAccessRuleAll(rule);
break;
case AccessControlModification.RemoveSpecific:
this.RemoveAccessRuleSpecific(rule);
break;
}
modified = true;
return true;
}
}
modified = false;
return false;
}
/// <summary>Adds the specified audit rule to the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <param name="rule">The audit rule to add.</param>
// Token: 0x06002CD6 RID: 11478 RVA: 0x00093208 File Offset: 0x00091408
protected void AddAuditRule(AuditRule rule)
{
this.audit_rules.Add(rule);
base.AuditRulesModified = true;
}
/// <summary>Removes audit rules that contain the same security identifier and access mask as the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <returns>true if the audit rule was successfully removed; otherwise, false.</returns>
/// <param name="rule">The audit rule to remove.</param>
// Token: 0x06002CD7 RID: 11479 RVA: 0x00093220 File Offset: 0x00091420
protected bool RemoveAuditRule(AuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules that have the same security identifier as the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <param name="rule">The audit rule to remove.</param>
// Token: 0x06002CD8 RID: 11480 RVA: 0x00093228 File Offset: 0x00091428
protected void RemoveAuditRuleAll(AuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules that exactly match the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <param name="rule">The audit rule to remove.</param>
// Token: 0x06002CD9 RID: 11481 RVA: 0x00093230 File Offset: 0x00091430
protected void RemoveAuditRuleSpecific(AuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules that contain the same security identifier and qualifier as the specified audit rule in the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object and then adds the specified audit rule.</summary>
/// <param name="rule">The audit rule to set.</param>
// Token: 0x06002CDA RID: 11482 RVA: 0x00093238 File Offset: 0x00091438
protected void SetAuditRule(AuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Applies the specified modification to the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <returns>true if the SACL is successfully modified; otherwise, false.</returns>
/// <param name="modification">The modification to apply to the SACL.</param>
/// <param name="rule">The audit rule to modify.</param>
/// <param name="modified">true if the SACL is successfully modified; otherwise, false.</param>
// Token: 0x06002CDB RID: 11483 RVA: 0x00093240 File Offset: 0x00091440
protected override bool ModifyAudit(AccessControlModification modification, AuditRule rule, out bool modified)
{
foreach (AuditRule auditRule in this.audit_rules)
{
if (rule == auditRule)
{
switch (modification)
{
case AccessControlModification.Add:
this.AddAuditRule(rule);
break;
case AccessControlModification.Set:
this.SetAuditRule(rule);
break;
case AccessControlModification.Remove:
this.RemoveAuditRule(rule);
break;
case AccessControlModification.RemoveAll:
this.RemoveAuditRuleAll(rule);
break;
case AccessControlModification.RemoveSpecific:
this.RemoveAuditRuleSpecific(rule);
break;
}
base.AuditRulesModified = true;
modified = true;
return true;
}
}
modified = false;
return false;
}
// Token: 0x040011A1 RID: 4513
private List<AccessRule> access_rules = new List<AccessRule>();
// Token: 0x040011A2 RID: 4514
private List<AuditRule> audit_rules = new List<AuditRule>();
}
}
@@ -0,0 +1,248 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a security descriptor. A security descriptor includes an owner, a primary group, a Discretionary Access Control List (DACL), and a System Access Control List (SACL).</summary>
// Token: 0x020004B1 RID: 1201
public sealed class CommonSecurityDescriptor : GenericSecurityDescriptor
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> class from the specified <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</summary>
/// <param name="isContainer">true if the new security descriptor is associated with a container object.</param>
/// <param name="isDS">true if the new security descriptor is associated with a directory object.</param>
/// <param name="rawSecurityDescriptor">The <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object from which to create the new <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</param>
// Token: 0x06002CDC RID: 11484 RVA: 0x00093324 File Offset: 0x00091524
public CommonSecurityDescriptor(bool isContainer, bool isDS, RawSecurityDescriptor rawSecurityDescriptor)
{
throw new NotImplementedException();
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> class from the specified Security Descriptor Definition Language (SDDL) string.</summary>
/// <param name="isContainer">true if the new security descriptor is associated with a container object.</param>
/// <param name="isDS">true if the new security descriptor is associated with a directory object.</param>
/// <param name="sddlForm">The SDDL string from which to create the new <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</param>
// Token: 0x06002CDD RID: 11485 RVA: 0x00093334 File Offset: 0x00091534
public CommonSecurityDescriptor(bool isContainer, bool isDS, string sddlForm)
{
throw new NotImplementedException();
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> class from the specified array of byte values.</summary>
/// <param name="isContainer">true if the new security descriptor is associated with a container object.</param>
/// <param name="isDS">true if the new security descriptor is associated with a directory object.</param>
/// <param name="binaryForm">The array of byte values from which to create the new <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</param>
/// <param name="offset">The offset in the <paramref name="binaryForm" /> array at which to begin copying.</param>
// Token: 0x06002CDE RID: 11486 RVA: 0x00093344 File Offset: 0x00091544
public CommonSecurityDescriptor(bool isContainer, bool isDS, byte[] binaryForm, int offset)
{
throw new NotImplementedException();
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> class from the specified information.</summary>
/// <param name="isContainer">true if the new security descriptor is associated with a container object.</param>
/// <param name="isDS">true if the new security descriptor is associated with a directory object.</param>
/// <param name="flags">Flags that specify behavior of the new <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</param>
/// <param name="owner">The owner for the new <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</param>
/// <param name="group">The primary group for the new <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</param>
/// <param name="systemAcl">The System Access Control List (SACL) for the new <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</param>
/// <param name="discretionaryAcl">The Discretionary Access Control List (DACL) for the new <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</param>
// Token: 0x06002CDF RID: 11487 RVA: 0x00093354 File Offset: 0x00091554
public CommonSecurityDescriptor(bool isContainer, bool isDS, ControlFlags flags, SecurityIdentifier owner, SecurityIdentifier group, SystemAcl systemAcl, DiscretionaryAcl discretionaryAcl)
{
this.isContainer = isContainer;
this.isDS = isDS;
this.flags = flags;
this.owner = owner;
this.group = group;
this.systemAcl = systemAcl;
this.discretionaryAcl = discretionaryAcl;
throw new NotImplementedException();
}
/// <summary>Gets values that specify behavior of the <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</summary>
/// <returns>One or more values of the <see cref="T:System.Security.AccessControl.ControlFlags" /> enumeration combined with a logical OR operation.</returns>
// Token: 0x170008C8 RID: 2248
// (get) Token: 0x06002CE0 RID: 11488 RVA: 0x000933A4 File Offset: 0x000915A4
public override ControlFlags ControlFlags
{
get
{
return this.flags;
}
}
/// <summary>Gets or sets the discretionary access control list (DACL) for this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object. The DACL contains access rules.</summary>
/// <returns>The DACL for this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</returns>
// Token: 0x170008C9 RID: 2249
// (get) Token: 0x06002CE1 RID: 11489 RVA: 0x000933AC File Offset: 0x000915AC
// (set) Token: 0x06002CE2 RID: 11490 RVA: 0x000933B4 File Offset: 0x000915B4
public DiscretionaryAcl DiscretionaryAcl
{
get
{
return this.discretionaryAcl;
}
set
{
if (value == null)
{
}
this.discretionaryAcl = value;
}
}
/// <summary>Gets or sets the primary group for this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</summary>
/// <returns>The primary group for this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</returns>
// Token: 0x170008CA RID: 2250
// (get) Token: 0x06002CE3 RID: 11491 RVA: 0x000933C4 File Offset: 0x000915C4
// (set) Token: 0x06002CE4 RID: 11492 RVA: 0x000933CC File Offset: 0x000915CC
public override SecurityIdentifier Group
{
get
{
return this.group;
}
set
{
this.group = value;
}
}
/// <summary>Gets a Boolean value that specifies whether the object associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object is a container object.</summary>
/// <returns>true if the object associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object is a container object; otherwise, false.</returns>
// Token: 0x170008CB RID: 2251
// (get) Token: 0x06002CE5 RID: 11493 RVA: 0x000933D8 File Offset: 0x000915D8
public bool IsContainer
{
get
{
return this.isContainer;
}
}
/// <summary>Gets a Boolean value that specifies whether the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object is in canonical order.</summary>
/// <returns>true if the DACL associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object is in canonical order; otherwise, false.</returns>
// Token: 0x170008CC RID: 2252
// (get) Token: 0x06002CE6 RID: 11494 RVA: 0x000933E0 File Offset: 0x000915E0
public bool IsDiscretionaryAclCanonical
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets a Boolean value that specifies whether the object associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object is a directory object.</summary>
/// <returns>true if the object associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object is a directory object; otherwise, false.</returns>
// Token: 0x170008CD RID: 2253
// (get) Token: 0x06002CE7 RID: 11495 RVA: 0x000933E8 File Offset: 0x000915E8
public bool IsDS
{
get
{
return this.isDS;
}
}
/// <summary>Gets a Boolean value that specifies whether the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object is in canonical order.</summary>
/// <returns>true if the SACL associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object is in canonical order; otherwise, false.</returns>
// Token: 0x170008CE RID: 2254
// (get) Token: 0x06002CE8 RID: 11496 RVA: 0x000933F0 File Offset: 0x000915F0
public bool IsSystemAclCanonical
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets the owner of the object associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</summary>
/// <returns>The owner of the object associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</returns>
// Token: 0x170008CF RID: 2255
// (get) Token: 0x06002CE9 RID: 11497 RVA: 0x000933F8 File Offset: 0x000915F8
// (set) Token: 0x06002CEA RID: 11498 RVA: 0x00093400 File Offset: 0x00091600
public override SecurityIdentifier Owner
{
get
{
return this.owner;
}
set
{
this.owner = value;
}
}
/// <summary>Gets or sets the System Access Control List (SACL) for this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object. The SACL contains audit rules.</summary>
/// <returns>The SACL for this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</returns>
// Token: 0x170008D0 RID: 2256
// (get) Token: 0x06002CEB RID: 11499 RVA: 0x0009340C File Offset: 0x0009160C
// (set) Token: 0x06002CEC RID: 11500 RVA: 0x00093414 File Offset: 0x00091614
public SystemAcl SystemAcl
{
get
{
return this.systemAcl;
}
set
{
this.systemAcl = value;
}
}
/// <summary>Removes all access rules for the specified security identifier from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</summary>
/// <param name="sid">The security identifier for which to remove access rules.</param>
// Token: 0x06002CED RID: 11501 RVA: 0x00093420 File Offset: 0x00091620
public void PurgeAccessControl(SecurityIdentifier sid)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules for the specified security identifier from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object.</summary>
/// <param name="sid">The security identifier for which to remove audit rules.</param>
// Token: 0x06002CEE RID: 11502 RVA: 0x00093428 File Offset: 0x00091628
public void PurgeAudit(SecurityIdentifier sid)
{
throw new NotImplementedException();
}
/// <summary>Sets the inheritance protection for the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object. DACLs that are protected do not inherit access rules from parent containers.</summary>
/// <param name="isProtected">true to protect the DACL from inheritance.</param>
/// <param name="preserveInheritance">true to keep inherited access rules in the DACL; false to remove inherited access rules from the DACL.</param>
// Token: 0x06002CEF RID: 11503 RVA: 0x00093430 File Offset: 0x00091630
public void SetDiscretionaryAclProtection(bool isProtected, bool preserveInheritance)
{
throw new NotImplementedException();
}
/// <summary>Sets the inheritance protection for the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonSecurityDescriptor" /> object. SACLs that are protected do not inherit audit rules from parent containers.</summary>
/// <param name="isProtected">true to protect the SACL from inheritance.</param>
/// <param name="preserveInheritance">true to keep inherited audit rules in the SACL; false to remove inherited audit rules from the SACL.</param>
// Token: 0x06002CF0 RID: 11504 RVA: 0x00093438 File Offset: 0x00091638
public void SetSystemAclProtection(bool isProtected, bool preserveInheritance)
{
throw new NotImplementedException();
}
// Token: 0x040011A3 RID: 4515
private bool isContainer;
// Token: 0x040011A4 RID: 4516
private bool isDS;
// Token: 0x040011A5 RID: 4517
private ControlFlags flags;
// Token: 0x040011A6 RID: 4518
private SecurityIdentifier owner;
// Token: 0x040011A7 RID: 4519
private SecurityIdentifier group;
// Token: 0x040011A8 RID: 4520
private SystemAcl systemAcl;
// Token: 0x040011A9 RID: 4521
private DiscretionaryAcl discretionaryAcl;
}
}
@@ -0,0 +1,70 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a compound Access Control Entry (ACE).</summary>
// Token: 0x020004B2 RID: 1202
public sealed class CompoundAce : KnownAce
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CompoundAce" /> class.</summary>
/// <param name="flags">Contains flags that specify information about the inheritance, inheritance propagation, and auditing conditions for the new Access Control Entry (ACE).</param>
/// <param name="accessMask">The access mask for the ACE.</param>
/// <param name="compoundAceType">A value from the <see cref="T:System.Security.AccessControl.CompoundAceType" /> enumeration.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> associated with the new ACE.</param>
// Token: 0x06002CF1 RID: 11505 RVA: 0x00093440 File Offset: 0x00091640
public CompoundAce(AceFlags flags, int accessMask, CompoundAceType compoundAceType, SecurityIdentifier sid)
: base(InheritanceFlags.None, PropagationFlags.None)
{
this.compound_ace_type = compoundAceType;
base.AceFlags = flags;
base.AccessMask = accessMask;
base.SecurityIdentifier = sid;
}
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.CompoundAce" /> object. This length should be used before marshaling the ACL into a binary array with the <see cref="M:System.Security.AccessControl. CompoundAce.GetBinaryForm" /> method.</summary>
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl. CompoundAce" /> object.</returns>
// Token: 0x170008D1 RID: 2257
// (get) Token: 0x06002CF2 RID: 11506 RVA: 0x00093474 File Offset: 0x00091674
[MonoTODO]
public override int BinaryLength
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets the type of this <see cref="T:System.Security.AccessControl. CompoundAce" /> object.</summary>
/// <returns>The type of this <see cref="T:System.Security.AccessControl. CompoundAce" /> object.</returns>
// Token: 0x170008D2 RID: 2258
// (get) Token: 0x06002CF3 RID: 11507 RVA: 0x0009347C File Offset: 0x0009167C
// (set) Token: 0x06002CF4 RID: 11508 RVA: 0x00093484 File Offset: 0x00091684
public CompoundAceType CompoundAceType
{
get
{
return this.compound_ace_type;
}
set
{
this.compound_ace_type = value;
}
}
/// <summary>Marshals the contents of the <see cref="T:System.Security.AccessControl.CompoundAce" /> object into the specified byte array beginning at the specified offset.</summary>
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl. CompoundAce" /> is marshaled.</param>
/// <param name="offset">The offset at which to start marshaling.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl. CompoundAce" /> to be copied into <paramref name="array" />.</exception>
// Token: 0x06002CF5 RID: 11509 RVA: 0x00093490 File Offset: 0x00091690
[MonoTODO]
public override void GetBinaryForm(byte[] binaryForm, int offset)
{
throw new NotImplementedException();
}
// Token: 0x040011AA RID: 4522
private CompoundAceType compound_ace_type;
}
}
@@ -0,0 +1,13 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the type of a <see cref="T:System.Security.AccessControl.CompoundAce" /> object.</summary>
// Token: 0x020004B3 RID: 1203
public enum CompoundAceType
{
/// <summary>The <see cref="T:System.Security.AccessControl.CompoundAce" /> object is used for impersonation.</summary>
// Token: 0x040011AC RID: 4524
Impersonation = 1
}
}
@@ -0,0 +1,62 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>These flags affect the security descriptor behavior.</summary>
// Token: 0x020004B4 RID: 1204
[Flags]
public enum ControlFlags
{
/// <summary>No control flags.</summary>
// Token: 0x040011AE RID: 4526
None = 0,
/// <summary>Specifies that the owner <see cref="T:System.Security.Principal.SecurityIdentifier" /> was obtained by a defaulting mechanism. Set by resource managers only; should not be set by callers. </summary>
// Token: 0x040011AF RID: 4527
OwnerDefaulted = 1,
/// <summary>Specifies that the group <see cref="T:System.Security.Principal.SecurityIdentifier" /> was obtained by a defaulting mechanism. Set by resource managers only; should not be set by callers.</summary>
// Token: 0x040011B0 RID: 4528
GroupDefaulted = 2,
/// <summary>Specifies that the DACL is not null. Set by resource managers or users. </summary>
// Token: 0x040011B1 RID: 4529
DiscretionaryAclPresent = 4,
/// <summary>Specifies that the DACL was obtained by a defaulting mechanism. Set by resource managers only.</summary>
// Token: 0x040011B2 RID: 4530
DiscretionaryAclDefaulted = 8,
/// <summary>Specifies that the SACL is not null. Set by resource managers or users.</summary>
// Token: 0x040011B3 RID: 4531
SystemAclPresent = 16,
/// <summary>Specifies that the SACL was obtained by a defaulting mechanism. Set by resource managers only.</summary>
// Token: 0x040011B4 RID: 4532
SystemAclDefaulted = 32,
/// <summary>Ignored.</summary>
// Token: 0x040011B5 RID: 4533
DiscretionaryAclUntrusted = 64,
/// <summary>Ignored.</summary>
// Token: 0x040011B6 RID: 4534
ServerSecurity = 128,
/// <summary>Ignored.</summary>
// Token: 0x040011B7 RID: 4535
DiscretionaryAclAutoInheritRequired = 256,
/// <summary>Ignored.</summary>
// Token: 0x040011B8 RID: 4536
SystemAclAutoInheritRequired = 512,
/// <summary>Specifies that the Discretionary Access Control List (DACL) has been automatically inherited from the parent. Set by resource managers only.</summary>
// Token: 0x040011B9 RID: 4537
DiscretionaryAclAutoInherited = 1024,
/// <summary>Specifies that the System Access Control List (SACL) has been automatically inherited from the parent. Set by resource managers only.</summary>
// Token: 0x040011BA RID: 4538
SystemAclAutoInherited = 2048,
/// <summary>Specifies that the resource manager prevents auto-inheritance. Set by resource managers or users. </summary>
// Token: 0x040011BB RID: 4539
DiscretionaryAclProtected = 4096,
/// <summary>Specifies that the resource manager prevents auto-inheritance. Set by resource managers or users.</summary>
// Token: 0x040011BC RID: 4540
SystemAclProtected = 8192,
/// <summary>Specifies that the contents of the Reserved field are valid.</summary>
// Token: 0x040011BD RID: 4541
RMControlValid = 16384,
/// <summary>Specifies that the security descriptor binary representation is in the self-relative format. This flag is always set.</summary>
// Token: 0x040011BE RID: 4542
SelfRelative = 32768
}
}
@@ -0,0 +1,46 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents an access rule for a cryptographic key. An access rule represents a combination of a user's identity, an access mask, and an access control type (allow or deny). An access rule object also contains information about the how the rule is inherited by child objects and how that inheritance is propagated.</summary>
// Token: 0x020004B5 RID: 1205
public sealed class CryptoKeyAccessRule : AccessRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CryptoKeyAccessRule" /> class using the specified values. </summary>
/// <param name="identity">The identity to which the access rule applies. This parameter must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="cryptoKeyRights">The cryptographic key operation to which this access rule controls access.</param>
/// <param name="type">The valid access control type.</param>
// Token: 0x06002CF6 RID: 11510 RVA: 0x00093498 File Offset: 0x00091698
public CryptoKeyAccessRule(IdentityReference identity, CryptoKeyRights cryptoKeyRights, AccessControlType type)
: base(identity, 0, false, InheritanceFlags.None, PropagationFlags.None, AccessControlType.Allow)
{
this.rights = cryptoKeyRights;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CryptoKeyAccessRule" /> class using the specified values.</summary>
/// <param name="identity">The identity to which the access rule applies.</param>
/// <param name="cryptoKeyRights">The cryptographic key operation to which this access rule controls access.</param>
/// <param name="type">The valid access control type.</param>
// Token: 0x06002CF7 RID: 11511 RVA: 0x000934B0 File Offset: 0x000916B0
public CryptoKeyAccessRule(string identity, CryptoKeyRights cryptoKeyRights, AccessControlType type)
: this(new SecurityIdentifier(identity), cryptoKeyRights, type)
{
}
/// <summary>Gets the cryptographic key operation to which this access rule controls access.</summary>
/// <returns>The cryptographic key operation to which this access rule controls access.</returns>
// Token: 0x170008D3 RID: 2259
// (get) Token: 0x06002CF8 RID: 11512 RVA: 0x000934C0 File Offset: 0x000916C0
public CryptoKeyRights CryptoKeyRights
{
get
{
return this.rights;
}
}
// Token: 0x040011BF RID: 4543
private CryptoKeyRights rights;
}
}
@@ -0,0 +1,46 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents an audit rule for a cryptographic key. An audit rule represents a combination of a user's identity and an access mask. An audit rule also contains information about the how the rule is inherited by child objects, how that inheritance is propagated, and for what conditions it is audited.</summary>
// Token: 0x020004B6 RID: 1206
public sealed class CryptoKeyAuditRule : AuditRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CryptoKeyAuditRule" /> class using the specified values. </summary>
/// <param name="identity">The identity to which the audit rule applies. This parameter must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="cryptoKeyRights">The cryptographic key operation for which this audit rule generates audits.</param>
/// <param name="flags">The conditions that generate audits.</param>
// Token: 0x06002CF9 RID: 11513 RVA: 0x000934C8 File Offset: 0x000916C8
public CryptoKeyAuditRule(IdentityReference identity, CryptoKeyRights cryptoKeyRights, AuditFlags flags)
: base(identity, 0, false, InheritanceFlags.None, PropagationFlags.None, flags)
{
this.rights = cryptoKeyRights;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CryptoKeyAuditRule" /> class using the specified values. </summary>
/// <param name="identity">The identity to which the audit rule applies.</param>
/// <param name="cryptoKeyRights">The cryptographic key operation for which this audit rule generates audits.</param>
/// <param name="flags">The conditions that generate audits.</param>
// Token: 0x06002CFA RID: 11514 RVA: 0x000934E0 File Offset: 0x000916E0
public CryptoKeyAuditRule(string identity, CryptoKeyRights cryptoKeyRights, AuditFlags flags)
: this(new SecurityIdentifier(identity), cryptoKeyRights, flags)
{
}
/// <summary>Gets the cryptographic key operation for which this audit rule generates audits.</summary>
/// <returns>The cryptographic key operation for which this audit rule generates audits.</returns>
// Token: 0x170008D4 RID: 2260
// (get) Token: 0x06002CFB RID: 11515 RVA: 0x000934F0 File Offset: 0x000916F0
public CryptoKeyRights CryptoKeyRights
{
get
{
return this.rights;
}
}
// Token: 0x040011C0 RID: 4544
private CryptoKeyRights rights;
}
}
@@ -0,0 +1,59 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the cryptographic key operation for which an authorization rule controls access or auditing.</summary>
// Token: 0x020004B7 RID: 1207
[Flags]
public enum CryptoKeyRights
{
/// <summary>Read the key data.</summary>
// Token: 0x040011C2 RID: 4546
ReadData = 1,
/// <summary>Write key data.</summary>
// Token: 0x040011C3 RID: 4547
WriteData = 2,
/// <summary>Read extended attributes of the key.</summary>
// Token: 0x040011C4 RID: 4548
ReadExtendedAttributes = 8,
/// <summary>Write extended attributes of the key.</summary>
// Token: 0x040011C5 RID: 4549
WriteExtendedAttributes = 16,
/// <summary>Read attributes of the key.</summary>
// Token: 0x040011C6 RID: 4550
ReadAttributes = 128,
/// <summary>Write attributes of the key.</summary>
// Token: 0x040011C7 RID: 4551
WriteAttributes = 256,
/// <summary>Delete the key.</summary>
// Token: 0x040011C8 RID: 4552
Delete = 65536,
/// <summary>Read permissions for the key.</summary>
// Token: 0x040011C9 RID: 4553
ReadPermissions = 131072,
/// <summary>Change permissions for the key.</summary>
// Token: 0x040011CA RID: 4554
ChangePermissions = 262144,
/// <summary>Take ownership of the key.</summary>
// Token: 0x040011CB RID: 4555
TakeOwnership = 524288,
/// <summary>Use the key for synchronization.</summary>
// Token: 0x040011CC RID: 4556
Synchronize = 1048576,
/// <summary>Full control of the key.</summary>
// Token: 0x040011CD RID: 4557
FullControl = 2032027,
/// <summary>A combination of <see cref="F:System.Security.AccessControl.CryptoKeyRights.GenericRead" /> and <see cref="F:System.Security.AccessControl.CryptoKeyRights.GenericWrite" />.</summary>
// Token: 0x040011CE RID: 4558
GenericAll = 268435456,
/// <summary>Not used.</summary>
// Token: 0x040011CF RID: 4559
GenericExecute = 536870912,
/// <summary>Write the key data, extended attributes of the key, attributes of the key, and permissions for the key.</summary>
// Token: 0x040011D0 RID: 4560
GenericWrite = 1073741824,
/// <summary>Read the key data, extended attributes of the key, attributes of the key, and permissions for the key.</summary>
// Token: 0x040011D1 RID: 4561
GenericRead = -2147483648
}
}
@@ -0,0 +1,190 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Provides the ability to control access to a cryptographic key object without direct manipulation of an Access Control List (ACL).</summary>
// Token: 0x020004B8 RID: 1208
public sealed class CryptoKeySecurity : NativeObjectSecurity
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> class.</summary>
// Token: 0x06002CFC RID: 11516 RVA: 0x000934F8 File Offset: 0x000916F8
[MonoTODO]
public CryptoKeySecurity()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> class by using the specified security descriptor.</summary>
/// <param name="securityDescriptor">The security descriptor from which to create the new <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</param>
// Token: 0x06002CFD RID: 11517 RVA: 0x00093500 File Offset: 0x00091700
[MonoTODO]
public CryptoKeySecurity(CommonSecurityDescriptor securityDescriptor)
{
}
/// <summary>Gets the <see cref="T:System.Type" /> of the securable object associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</summary>
/// <returns>The type of the securable object associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</returns>
// Token: 0x170008D5 RID: 2261
// (get) Token: 0x06002CFE RID: 11518 RVA: 0x00093508 File Offset: 0x00091708
public override Type AccessRightType
{
get
{
return typeof(CryptoKeyRights);
}
}
/// <summary>Gets the <see cref="T:System.Type" /> of the object associated with the access rules of this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object. The <see cref="T:System.Type" /> object must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</summary>
/// <returns>The type of the object associated with the access rules of this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</returns>
// Token: 0x170008D6 RID: 2262
// (get) Token: 0x06002CFF RID: 11519 RVA: 0x00093514 File Offset: 0x00091714
public override Type AccessRuleType
{
get
{
return typeof(CryptoKeyAccessRule);
}
}
/// <summary>Gets the <see cref="T:System.Type" /> object associated with the audit rules of this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object. The <see cref="T:System.Type" /> object must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</summary>
/// <returns>The type of the object associated with the audit rules of this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</returns>
// Token: 0x170008D7 RID: 2263
// (get) Token: 0x06002D00 RID: 11520 RVA: 0x00093520 File Offset: 0x00091720
public override Type AuditRuleType
{
get
{
return typeof(CryptoKeyAuditRule);
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.AccessRule" /> class with the specified values.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.AccessRule" /> object that this method creates.</returns>
/// <param name="identityReference">The identity to which the access rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">Specifies the inheritance properties of the access rule.</param>
/// <param name="propagationFlags">Specifies whether inherited access rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="type">Specifies the valid access control type.</param>
// Token: 0x06002D01 RID: 11521 RVA: 0x0009352C File Offset: 0x0009172C
public sealed override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
{
return new CryptoKeyAccessRule(identityReference, (CryptoKeyRights)accessMask, type);
}
/// <summary>Adds the specified access rule to the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</summary>
/// <param name="rule">The access rule to add.</param>
// Token: 0x06002D02 RID: 11522 RVA: 0x00093538 File Offset: 0x00091738
[MonoTODO]
public void AddAccessRule(CryptoKeyAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes access rules that contain the same security identifier and access mask as the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</summary>
/// <returns>true if the access rule was successfully removed; otherwise, false.</returns>
/// <param name="rule">The access rule to remove.</param>
// Token: 0x06002D03 RID: 11523 RVA: 0x00093540 File Offset: 0x00091740
[MonoTODO]
public bool RemoveAccessRule(CryptoKeyAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules that have the same security identifier as the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</summary>
/// <param name="rule">The access rule to remove.</param>
// Token: 0x06002D04 RID: 11524 RVA: 0x00093548 File Offset: 0x00091748
[MonoTODO]
public void RemoveAccessRuleAll(CryptoKeyAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules that exactly match the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</summary>
/// <param name="rule">The access rule to remove.</param>
// Token: 0x06002D05 RID: 11525 RVA: 0x00093550 File Offset: 0x00091750
[MonoTODO]
public void RemoveAccessRuleSpecific(CryptoKeyAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules in the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object and then adds the specified access rule.</summary>
/// <param name="rule">The access rule to reset.</param>
// Token: 0x06002D06 RID: 11526 RVA: 0x00093558 File Offset: 0x00091758
[MonoTODO]
public void ResetAccessRule(CryptoKeyAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules that contain the same security identifier and qualifier as the specified access rule in the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object and then adds the specified access rule.</summary>
/// <param name="rule">The access rule to set.</param>
// Token: 0x06002D07 RID: 11527 RVA: 0x00093560 File Offset: 0x00091760
[MonoTODO]
public void SetAccessRule(CryptoKeyAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.AuditRule" /> class with the specified values.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.AuditRule" /> object that this method creates.</returns>
/// <param name="identityReference">The identity to which the audit rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">Specifies the inheritance properties of the audit rule.</param>
/// <param name="propagationFlags">Specifies whether inherited audit rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="flags">Specifies the conditions for which the rule is audited.</param>
// Token: 0x06002D08 RID: 11528 RVA: 0x00093568 File Offset: 0x00091768
public sealed override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
{
return new CryptoKeyAuditRule(identityReference, (CryptoKeyRights)accessMask, flags);
}
/// <summary>Adds the specified audit rule to the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</summary>
/// <param name="rule">The audit rule to add.</param>
// Token: 0x06002D09 RID: 11529 RVA: 0x00093574 File Offset: 0x00091774
[MonoTODO]
public void AddAuditRule(CryptoKeyAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes audit rules that contain the same security identifier and access mask as the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</summary>
/// <returns>true if the audit rule was successfully removed; otherwise, false.</returns>
/// <param name="rule">The audit rule to remove.</param>
// Token: 0x06002D0A RID: 11530 RVA: 0x0009357C File Offset: 0x0009177C
[MonoTODO]
public bool RemoveAuditRule(CryptoKeyAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules that have the same security identifier as the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</summary>
/// <param name="rule">The audit rule to remove.</param>
// Token: 0x06002D0B RID: 11531 RVA: 0x00093584 File Offset: 0x00091784
[MonoTODO]
public void RemoveAuditRuleAll(CryptoKeyAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules that exactly match the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object.</summary>
/// <param name="rule">The audit rule to remove.</param>
// Token: 0x06002D0C RID: 11532 RVA: 0x0009358C File Offset: 0x0009178C
[MonoTODO]
public void RemoveAuditRuleSpecific(CryptoKeyAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules that contain the same security identifier and qualifier as the specified audit rule in the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object and then adds the specified audit rule.</summary>
/// <param name="rule">The audit rule to set.</param>
// Token: 0x06002D0D RID: 11533 RVA: 0x00093594 File Offset: 0x00091794
[MonoTODO]
public void SetAuditRule(CryptoKeyAuditRule rule)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,87 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Represents an Access Control Entry (ACE) that is not defined by one of the members of the <see cref="T:System.Security.AccessControl.AceType" /> enumeration.</summary>
// Token: 0x020004B9 RID: 1209
public sealed class CustomAce : GenericAce
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.CustomAce" /> class.</summary>
/// <param name="type">Type of the new Access Control Entry (ACE). This value must be greater than <see cref="F:System.Security.AccessControl.AceType.MaxDefinedAceType" />.</param>
/// <param name="flags">Flags that specify information about the inheritance, inheritance propagation, and auditing conditions for the new ACE.</param>
/// <param name="opaque">An array of byte values that contains the data for the new ACE. This value can be null. The length of this array must not be greater than the value of the <see cref="F:System.Security.AccessControl.CustomAce.MaxOpaqueLength" /> field, and must be a multiple of four.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="type" /> parameter is not greater than <see cref="F:System.Security.AccessControl.AceType.MaxDefinedAceType" /> or the length of the <paramref name="opaque" /> array is either greater than the value of the <see cref="F:System.Security.AccessControl.CustomAce.MaxOpaqueLength" /> field or not a multiple of four.</exception>
// Token: 0x06002D0E RID: 11534 RVA: 0x0009359C File Offset: 0x0009179C
public CustomAce(AceType type, AceFlags flags, byte[] opaque)
: base(type)
{
base.AceFlags = flags;
this.SetOpaque(opaque);
}
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.CustomAce" /> object. This length should be used before marshaling the ACL into a binary array with the <see cref="M:System.Security.AccessControl.CustomAce.GetBinaryForm" /> method.</summary>
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.CustomAce" /> object.</returns>
// Token: 0x170008D8 RID: 2264
// (get) Token: 0x06002D0F RID: 11535 RVA: 0x000935B4 File Offset: 0x000917B4
[MonoTODO]
public override int BinaryLength
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets the length of the opaque data associated with this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</summary>
/// <returns>The length of the opaque callback data.</returns>
// Token: 0x170008D9 RID: 2265
// (get) Token: 0x06002D10 RID: 11536 RVA: 0x000935BC File Offset: 0x000917BC
public int OpaqueLength
{
get
{
return this.opaque.Length;
}
}
/// <summary>Marshals the contents of the <see cref="T:System.Security.AccessControl.CustomAce" /> object into the specified byte array beginning at the specified offset.</summary>
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl.CustomAce" /> is marshaled.</param>
/// <param name="offset">The offset at which to start marshaling.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl.CustomAce" /> to be copied into <paramref name="array" />.</exception>
// Token: 0x06002D11 RID: 11537 RVA: 0x000935C8 File Offset: 0x000917C8
[MonoTODO]
public override void GetBinaryForm(byte[] binaryForm, int offset)
{
throw new NotImplementedException();
}
/// <summary>Returns the opaque data associated with this <see cref="T:System.Security.AccessControl.CustomAce" /> object. </summary>
/// <returns>An array of byte values that represents the opaque data associated with this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</returns>
// Token: 0x06002D12 RID: 11538 RVA: 0x000935D0 File Offset: 0x000917D0
public byte[] GetOpaque()
{
return (byte[])this.opaque.Clone();
}
/// <summary>Sets the opaque callback data associated with this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</summary>
/// <param name="opaque">An array of byte values that represents the opaque callback data for this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</param>
// Token: 0x06002D13 RID: 11539 RVA: 0x000935E4 File Offset: 0x000917E4
public void SetOpaque(byte[] opaque)
{
if (opaque == null)
{
throw new ArgumentNullException("opaque");
}
this.opaque = (byte[])opaque.Clone();
}
// Token: 0x040011D2 RID: 4562
private byte[] opaque;
/// <summary>Returns the maximum allowed length of an opaque data blob for this <see cref="T:System.Security.AccessControl.CustomAce" /> object.</summary>
// Token: 0x040011D3 RID: 4563
[MonoTODO]
public static readonly int MaxOpaqueLength;
}
}
@@ -0,0 +1,201 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Provides the ability to control access to directory objects without direct manipulation of Access Control Lists (ACLs).</summary>
// Token: 0x020004BA RID: 1210
public abstract class DirectoryObjectSecurity : ObjectSecurity
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> class.</summary>
// Token: 0x06002D14 RID: 11540 RVA: 0x00093614 File Offset: 0x00091814
protected DirectoryObjectSecurity()
: base(false, true)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> class with the specified security descriptor.</summary>
/// <param name="securityDescriptor">The security descriptor to be associated with the new <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" />object.</param>
// Token: 0x06002D15 RID: 11541 RVA: 0x00093620 File Offset: 0x00091820
protected DirectoryObjectSecurity(CommonSecurityDescriptor securityDescriptor)
: base(securityDescriptor != null && securityDescriptor.IsContainer, true)
{
if (securityDescriptor == null)
{
throw new ArgumentNullException("securityDescriptor");
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.AccessRule" /> class with the specified values.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.AccessRule" /> object that this method creates.</returns>
/// <param name="identityReference">The identity to which the access rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">Specifies the inheritance properties of the access rule.</param>
/// <param name="propagationFlags">Specifies whether inherited access rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="type">Specifies the valid access control type.</param>
/// <param name="objectType">The identity of the class of objects to which the new access rule applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the new access rule.</param>
// Token: 0x06002D16 RID: 11542 RVA: 0x0009364C File Offset: 0x0009184C
public virtual AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.AuditRule" /> class with the specified values.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.AuditRule" /> object that this method creates.</returns>
/// <param name="identityReference">The identity to which the audit rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">Specifies the inheritance properties of the audit rule.</param>
/// <param name="propagationFlags">Specifies whether inherited audit rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="flags">Specifies the conditions for which the rule is audited.</param>
/// <param name="objectType">The identity of the class of objects to which the new audit rule applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the new audit rule.</param>
// Token: 0x06002D17 RID: 11543 RVA: 0x00093654 File Offset: 0x00091854
public virtual AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
/// <summary>Gets a collection of the access rules associated with the specified security identifier.</summary>
/// <returns>The collection of access rules associated with the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</returns>
/// <param name="includeExplicit">true to include access rules explicitly set for the object.</param>
/// <param name="includeInherited">true to include inherited access rules.</param>
/// <param name="targetType">The security identifier for which to retrieve access rules. This must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// Token: 0x06002D18 RID: 11544 RVA: 0x0009365C File Offset: 0x0009185C
public AuthorizationRuleCollection GetAccessRules(bool includeExplicit, bool includeInherited, Type targetType)
{
throw new NotImplementedException();
}
/// <summary>Gets a collection of the audit rules associated with the specified security identifier.</summary>
/// <returns>The collection of audit rules associated with the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</returns>
/// <param name="includeExplicit">true to include audit rules explicitly set for the object.</param>
/// <param name="includeInherited">true to include inherited audit rules.</param>
/// <param name="targetType">The security identifier for which to retrieve audit rules. This must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// Token: 0x06002D19 RID: 11545 RVA: 0x00093664 File Offset: 0x00091864
public AuthorizationRuleCollection GetAuditRules(bool includeExplicit, bool includeInherited, Type targetType)
{
throw new NotImplementedException();
}
/// <summary>Adds the specified access rule to the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object.</summary>
/// <param name="rule">The access rule to add.</param>
// Token: 0x06002D1A RID: 11546 RVA: 0x0009366C File Offset: 0x0009186C
protected void AddAccessRule(ObjectAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Adds the specified audit rule to the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object.</summary>
/// <param name="rule">The audit rule to add.</param>
// Token: 0x06002D1B RID: 11547 RVA: 0x00093674 File Offset: 0x00091874
protected void AddAuditRule(ObjectAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Applies the specified modification to the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object.</summary>
/// <returns>true if the DACL is successfully modified; otherwise, false.</returns>
/// <param name="modification">The modification to apply to the DACL.</param>
/// <param name="rule">The access rule to modify.</param>
/// <param name="modified">true if the DACL is successfully modified; otherwise, false.</param>
// Token: 0x06002D1C RID: 11548 RVA: 0x0009367C File Offset: 0x0009187C
protected override bool ModifyAccess(AccessControlModification modification, AccessRule rule, out bool modified)
{
throw new NotImplementedException();
}
/// <summary>Applies the specified modification to the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object.</summary>
/// <returns>true if the SACL is successfully modified; otherwise, false.</returns>
/// <param name="modification">The modification to apply to the SACL.</param>
/// <param name="rule">The audit rule to modify.</param>
/// <param name="modified">true if the SACL is successfully modified; otherwise, false.</param>
// Token: 0x06002D1D RID: 11549 RVA: 0x00093684 File Offset: 0x00091884
protected override bool ModifyAudit(AccessControlModification modification, AuditRule rule, out bool modified)
{
throw new NotImplementedException();
}
/// <summary>Removes access rules that contain the same security identifier and access mask as the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object.</summary>
/// <returns>true if the access rule was successfully removed; otherwise, false.</returns>
/// <param name="rule">The access rule to remove.</param>
// Token: 0x06002D1E RID: 11550 RVA: 0x0009368C File Offset: 0x0009188C
protected bool RemoveAccessRule(ObjectAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules that have the same security identifier as the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object.</summary>
/// <param name="rule">The access rule to remove.</param>
// Token: 0x06002D1F RID: 11551 RVA: 0x00093694 File Offset: 0x00091894
protected void RemoveAccessRuleAll(ObjectAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules that exactly match the specified access rule from the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object.</summary>
/// <param name="rule">The access rule to remove.</param>
// Token: 0x06002D20 RID: 11552 RVA: 0x0009369C File Offset: 0x0009189C
protected void RemoveAccessRuleSpecific(ObjectAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes audit rules that contain the same security identifier and access mask as the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> object.</summary>
/// <returns>true if the audit rule was successfully removed; otherwise, false.</returns>
/// <param name="rule">The audit rule to remove.</param>
// Token: 0x06002D21 RID: 11553 RVA: 0x000936A4 File Offset: 0x000918A4
protected bool RemoveAuditRule(ObjectAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules that have the same security identifier as the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object.</summary>
/// <param name="rule">The audit rule to remove.</param>
// Token: 0x06002D22 RID: 11554 RVA: 0x000936AC File Offset: 0x000918AC
protected void RemoveAuditRuleAll(ObjectAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules that exactly match the specified audit rule from the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object.</summary>
/// <param name="rule">The audit rule to remove.</param>
// Token: 0x06002D23 RID: 11555 RVA: 0x000936B4 File Offset: 0x000918B4
protected void RemoveAuditRuleSpecific(ObjectAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules in the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object and then adds the specified access rule.</summary>
/// <param name="rule">The access rule to reset.</param>
// Token: 0x06002D24 RID: 11556 RVA: 0x000936BC File Offset: 0x000918BC
protected void ResetAccessRule(ObjectAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules that contain the same security identifier and qualifier as the specified access rule in the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object and then adds the specified access rule.</summary>
/// <param name="rule">The access rule to set.</param>
// Token: 0x06002D25 RID: 11557 RVA: 0x000936C4 File Offset: 0x000918C4
protected void SetAccessRule(ObjectAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules that contain the same security identifier and qualifier as the specified audit rule in the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> object and then adds the specified audit rule.</summary>
/// <param name="rule">The audit rule to set.</param>
// Token: 0x06002D26 RID: 11558 RVA: 0x000936CC File Offset: 0x000918CC
protected void SetAuditRule(ObjectAuditRule rule)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,39 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Represents the access control and audit security for a directory. This class cannot be inherited.</summary>
// Token: 0x020004BB RID: 1211
public sealed class DirectorySecurity : FileSystemSecurity
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.DirectorySecurity" /> class. </summary>
/// <exception cref="T:System.PlatformNotSupportedException">The current operating system is not Microsoft Windows 2000 or later.</exception>
// Token: 0x06002D27 RID: 11559 RVA: 0x000936D4 File Offset: 0x000918D4
public DirectorySecurity()
: base(true)
{
throw new PlatformNotSupportedException();
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.DirectorySecurity" /> class from a specified directory using the specified values of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration.</summary>
/// <param name="name">The location of a directory to create a <see cref="T:System.Security.AccessControl.DirectorySecurity" /> object from.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> values that specifies the type of access control list (ACL) information to retrieve. </param>
/// <exception cref="T:System.ArgumentException">The <paramref name="name" /> parameter is a zero-length string, contains only white space, or contains one or more invalid characters as defined by <see cref="F:System.IO.Path.InvalidPathChars" />. </exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null.</exception>
/// <exception cref="T:System.IO.DirectoryNotFoundException">The specified path is invalid, (for example, it is on an unmapped drive). </exception>
/// <exception cref="T:System.IO.FileNotFoundException">The file specified in the <paramref name="name" /> parameter was not found. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurred while opening the directory.</exception>
/// <exception cref="T:System.NotSupportedException">The <paramref name="name" /> parameter is in an invalid format. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The current operating system is not Microsoft Windows 2000 or later.</exception>
/// <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. </exception>
/// <exception cref="T:System.Security.AccessControl.PrivilegeNotHeldException">The current system account does not have administrative privileges.</exception>
/// <exception cref="T:System.SystemException">The directory could not be found.</exception>
/// <exception cref="T:System.UnauthorizedAccessException">The <paramref name="name" /> parameter specified a directory that is read-only.-or- This operation is not supported on the current platform.-or- The caller does not have the required permission.</exception>
// Token: 0x06002D28 RID: 11560 RVA: 0x000936E4 File Offset: 0x000918E4
public DirectorySecurity(string name, AccessControlSections includeSections)
: base(true, name, includeSections)
{
throw new PlatformNotSupportedException();
}
}
}
@@ -0,0 +1,152 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a Discretionary Access Control List (DACL).</summary>
// Token: 0x020004BC RID: 1212
public sealed class DiscretionaryAcl : CommonAcl
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> class with the specified values.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object is a container.</param>
/// <param name="isDS">true if the new <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object is a directory object Access Control List (ACL).</param>
/// <param name="capacity">The number of Access Control Entries (ACEs) this <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object can contain. This number is to be used only as a hint.</param>
// Token: 0x06002D29 RID: 11561 RVA: 0x000936F4 File Offset: 0x000918F4
public DiscretionaryAcl(bool isContainer, bool isDS, int capacity)
: this(isContainer, isDS, 0, capacity)
{
throw new NotImplementedException();
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> class with the specified values from the specified <see cref="T:System.Security.AccessControl.RawAcl" /> object.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object is a container.</param>
/// <param name="isDS">true if the new <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object is a directory object Access Control List (ACL).</param>
/// <param name="rawAcl">The underlying <see cref="T:System.Security.AccessControl.RawAcl" /> object for the new <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object. Specify null to create an empty ACL.</param>
// Token: 0x06002D2A RID: 11562 RVA: 0x00093708 File Offset: 0x00091908
public DiscretionaryAcl(bool isContainer, bool isDS, RawAcl rawAcl)
: base(isContainer, isDS, 0)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> class with the specified values.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object is a container.</param>
/// <param name="isDS">true if the new <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object is a directory object Access Control List (ACL).</param>
/// <param name="revision">The revision level of the new <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object.</param>
/// <param name="capacity">The number of Access Control Entries (ACEs) this <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object can contain. This number is to be used only as a hint.</param>
// Token: 0x06002D2B RID: 11563 RVA: 0x00093714 File Offset: 0x00091914
public DiscretionaryAcl(bool isContainer, bool isDS, byte revision, int capacity)
: base(isContainer, isDS, revision, capacity)
{
}
/// <summary>Adds an Access Control Entry (ACE) with the specified settings to the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object.</summary>
/// <param name="accessType">The type of access control (allow or deny) to add.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to add an ACE.</param>
/// <param name="accessMask">The access rule for the new ACE.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the new ACE.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the new ACE.</param>
// Token: 0x06002D2C RID: 11564 RVA: 0x00093724 File Offset: 0x00091924
public void AddAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
throw new NotImplementedException();
}
/// <summary>Adds an Access Control Entry (ACE) with the specified settings to the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type for the new ACE.</summary>
/// <param name="accessType">The type of access control (allow or deny) to add.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to add an ACE.</param>
/// <param name="accessMask">The access rule for the new ACE.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the new ACE.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the new ACE.</param>
/// <param name="objectFlags">Flags that specify if the <paramref name="objectType" /> and <paramref name="inheritedObjectType" /> parameters contain non-null values.</param>
/// <param name="objectType">The identity of the class of objects to which the new ACE applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the new ACE.</param>
// Token: 0x06002D2D RID: 11565 RVA: 0x0009372C File Offset: 0x0009192C
public void AddAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
/// <summary>Removes the specified access control rule from the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object.</summary>
/// <returns>true if this method successfully removes the specified access; otherwise, false.</returns>
/// <param name="accessType">The type of access control (allow or deny) to remove.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an access control rule.</param>
/// <param name="accessMask">The access mask for the rule to be removed.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the rule to be removed.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the rule to be removed.</param>
// Token: 0x06002D2E RID: 11566 RVA: 0x00093734 File Offset: 0x00091934
public bool RemoveAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
throw new NotImplementedException();
}
/// <summary>Removes the specified access control rule from the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type.</summary>
/// <returns>true if this method successfully removes the specified access; otherwise, false.</returns>
/// <param name="accessType">The type of access control (allow or deny) to remove.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an access control rule.</param>
/// <param name="accessMask">The access mask for the access control rule to be removed.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the access control rule to be removed.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the access control rule to be removed.</param>
/// <param name="objectFlags">Flags that specify if the <paramref name="objectType" /> and <paramref name="inheritedObjectType" /> parameters contain non-null values.</param>
/// <param name="objectType">The identity of the class of objects to which the removed access control rule applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the removed access control rule.</param>
// Token: 0x06002D2F RID: 11567 RVA: 0x0009373C File Offset: 0x0009193C
public bool RemoveAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
/// <summary>Removes the specified Access Control Entry (ACE) from the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object.</summary>
/// <param name="accessType">The type of access control (allow or deny) to remove.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an ACE.</param>
/// <param name="accessMask">The access mask for the ACE to be removed.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the ACE to be removed.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the ACE to be removed.</param>
// Token: 0x06002D30 RID: 11568 RVA: 0x00093744 File Offset: 0x00091944
public void RemoveAccessSpecific(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
throw new NotImplementedException();
}
/// <summary>Removes the specified Access Control Entry (ACE) from the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type for the ACE to be removed.</summary>
/// <param name="accessType">The type of access control (allow or deny) to remove.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an ACE.</param>
/// <param name="accessMask">The access mask for the ACE to be removed.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the ACE to be removed.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the ACE to be removed.</param>
/// <param name="objectFlags">Flags that specify if the <paramref name="objectType" /> and <paramref name="inheritedObjectType" /> parameters contain non-null values.</param>
/// <param name="objectType">The identity of the class of objects to which the removed ACE applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the removed ACE.</param>
// Token: 0x06002D31 RID: 11569 RVA: 0x0009374C File Offset: 0x0009194C
public void RemoveAccessSpecific(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
/// <summary>Sets the specified access control for the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</summary>
/// <param name="accessType">The type of access control (allow or deny) to set.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to set an ACE.</param>
/// <param name="accessMask">The access rule for the new ACE.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the new ACE.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the new ACE.</param>
// Token: 0x06002D32 RID: 11570 RVA: 0x00093754 File Offset: 0x00091954
public void SetAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
throw new NotImplementedException();
}
/// <summary>Sets the specified access control for the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</summary>
/// <param name="accessType">The type of access control (allow or deny) to set.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to set an ACE.</param>
/// <param name="accessMask">The access rule for the new ACE.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the new ACE.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the new ACE.</param>
/// <param name="objectFlags">Flags that specify if the <paramref name="objectType" /> and <paramref name="inheritedObjectType" /> parameters contain non-null values.</param>
/// <param name="objectType">The identity of the class of objects to which the new ACE applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the new ACE.</param>
// Token: 0x06002D33 RID: 11571 RVA: 0x0009375C File Offset: 0x0009195C
public void SetAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,58 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. </summary>
// Token: 0x020004BD RID: 1213
public sealed class EventWaitHandleAccessRule : AccessRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.EventWaitHandleAccessRule" /> class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.</summary>
/// <param name="identity">The user or group the rule applies to. Must be of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> or a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="eventRights">A bitwise combination of <see cref="T:System.Security.AccessControl.EventWaitHandleRights" /> values specifying the rights allowed or denied.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="eventRights" /> specifies an invalid value.-or-<paramref name="type" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identity" /> is null.-or-<paramref name="eventRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002D34 RID: 11572 RVA: 0x00093764 File Offset: 0x00091964
public EventWaitHandleAccessRule(IdentityReference identity, EventWaitHandleRights eventRights, AccessControlType type)
: base(identity, 0, false, InheritanceFlags.None, PropagationFlags.None, AccessControlType.Allow)
{
this.rights = eventRights;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.EventWaitHandleAccessRule" /> class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.</summary>
/// <param name="identity">The name of the user or group the rule applies to.</param>
/// <param name="eventRights">A bitwise combination of <see cref="T:System.Security.AccessControl.EventWaitHandleRights" /> values specifying the rights allowed or denied.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="eventRights" /> specifies an invalid value.-or-<paramref name="type" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="eventRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is null.-or-<paramref name="identity" /> is a zero-length string.-or-<paramref name="identity" /> is longer than 512 characters.</exception>
// Token: 0x06002D35 RID: 11573 RVA: 0x0009377C File Offset: 0x0009197C
public EventWaitHandleAccessRule(string identity, EventWaitHandleRights eventRights, AccessControlType type)
: this(new SecurityIdentifier(identity), eventRights, type)
{
}
/// <summary>Gets the rights allowed or denied by the access rule.</summary>
/// <returns>A bitwise combination of <see cref="T:System.Security.AccessControl.EventWaitHandleRights" /> values indicating the rights allowed or denied by the access rule.</returns>
// Token: 0x170008DA RID: 2266
// (get) Token: 0x06002D36 RID: 11574 RVA: 0x0009378C File Offset: 0x0009198C
public EventWaitHandleRights EventWaitHandleRights
{
get
{
return this.rights;
}
}
// Token: 0x040011D4 RID: 4564
private EventWaitHandleRights rights;
}
}
@@ -0,0 +1,68 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a set of access rights to be audited for a user or group. This class cannot be inherited. </summary>
// Token: 0x020004BE RID: 1214
public sealed class EventWaitHandleAuditRule : AuditRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.EventWaitHandleAuditRule" /> class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both.</summary>
/// <param name="identity">The user or group the rule applies to. Must be of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> or a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="eventRights">A bitwise combination of <see cref="T:System.Security.AccessControl.EventWaitHandleRights" /> values specifying the kinds of access to audit.</param>
/// <param name="flags">A bitwise combination of <see cref="T:System.Security.AccessControl.AuditFlags" /> values specifying whether to audit success, failure, or both.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="eventRights" /> specifies an invalid value.-or-<paramref name="flags" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identity" /> is null. -or-<paramref name="eventRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="flags" /> is <see cref="F:System.Security.AccessControl.AuditFlags.None" />.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002D37 RID: 11575 RVA: 0x00093794 File Offset: 0x00091994
public EventWaitHandleAuditRule(IdentityReference identity, EventWaitHandleRights eventRights, AuditFlags flags)
: base(identity, 0, false, InheritanceFlags.None, PropagationFlags.None, flags)
{
if (eventRights < EventWaitHandleRights.Modify || eventRights > EventWaitHandleRights.FullControl)
{
throw new ArgumentOutOfRangeException("eventRights");
}
if (flags < AuditFlags.None || flags > AuditFlags.Failure)
{
throw new ArgumentOutOfRangeException("flags");
}
if (identity == null)
{
throw new ArgumentNullException("identity");
}
if (eventRights == (EventWaitHandleRights)0)
{
throw new ArgumentNullException("eventRights");
}
if (flags == AuditFlags.None)
{
throw new ArgumentException("flags");
}
if (!(identity is SecurityIdentifier))
{
throw new ArgumentException("identity");
}
this.rights = eventRights;
}
/// <summary>Gets the access rights affected by the audit rule.</summary>
/// <returns>A bitwise combination of <see cref="T:System.Security.AccessControl.EventWaitHandleRights" /> values that indicates the rights affected by the audit rule.</returns>
// Token: 0x170008DB RID: 2267
// (get) Token: 0x06002D38 RID: 11576 RVA: 0x0009383C File Offset: 0x00091A3C
public EventWaitHandleRights EventWaitHandleRights
{
get
{
return this.rights;
}
}
// Token: 0x040011D5 RID: 4565
private EventWaitHandleRights rights;
}
}
@@ -0,0 +1,32 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the access control rights that can be applied to named system event objects.</summary>
// Token: 0x020004BF RID: 1215
[Flags]
public enum EventWaitHandleRights
{
/// <summary>The right to set or reset the signaled state of a named event.</summary>
// Token: 0x040011D7 RID: 4567
Modify = 2,
/// <summary>The right to delete a named event.</summary>
// Token: 0x040011D8 RID: 4568
Delete = 65536,
/// <summary>The right to open and copy the access rules and audit rules for a named event.</summary>
// Token: 0x040011D9 RID: 4569
ReadPermissions = 131072,
/// <summary>The right to change the security and audit rules associated with a named event.</summary>
// Token: 0x040011DA RID: 4570
ChangePermissions = 262144,
/// <summary>The right to change the owner of a named event.</summary>
// Token: 0x040011DB RID: 4571
TakeOwnership = 524288,
/// <summary>The right to wait on a named event.</summary>
// Token: 0x040011DC RID: 4572
Synchronize = 1048576,
/// <summary>The right to exert full control over a named event, and to modify its access rules and audit rules.</summary>
// Token: 0x040011DD RID: 4573
FullControl = 2031619
}
}
@@ -0,0 +1,217 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents the Windows access control security applied to a named system wait handle. This class cannot be inherited.</summary>
// Token: 0x020004C0 RID: 1216
public sealed class EventWaitHandleSecurity : NativeObjectSecurity
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.EventWaitHandleSecurity" /> class with default values.</summary>
/// <exception cref="T:System.NotSupportedException">This class is not supported on Windows 98 or Windows Millennium Edition.</exception>
// Token: 0x06002D39 RID: 11577 RVA: 0x00093844 File Offset: 0x00091A44
public EventWaitHandleSecurity()
{
throw new NotImplementedException();
}
/// <summary>Gets the enumeration type that the <see cref="T:System.Security.AccessControl.EventWaitHandleSecurity" /> class uses to represent access rights.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.EventWaitHandleRights" /> enumeration.</returns>
// Token: 0x170008DC RID: 2268
// (get) Token: 0x06002D3A RID: 11578 RVA: 0x00093854 File Offset: 0x00091A54
public override Type AccessRightType
{
get
{
return typeof(EventWaitHandleRights);
}
}
/// <summary>Gets the type that the <see cref="T:System.Security.AccessControl.EventWaitHandleSecurity" /> class uses to represent access rules.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.EventWaitHandleAccessRule" /> class.</returns>
// Token: 0x170008DD RID: 2269
// (get) Token: 0x06002D3B RID: 11579 RVA: 0x00093860 File Offset: 0x00091A60
public override Type AccessRuleType
{
get
{
return typeof(EventWaitHandleAccessRule);
}
}
/// <summary>Gets the type that the <see cref="T:System.Security.AccessControl.EventWaitHandleSecurity" /> class uses to represent audit rules.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.EventWaitHandleAuditRule" /> class.</returns>
// Token: 0x170008DE RID: 2270
// (get) Token: 0x06002D3C RID: 11580 RVA: 0x0009386C File Offset: 0x00091A6C
public override Type AuditRuleType
{
get
{
return typeof(EventWaitHandleAuditRule);
}
}
/// <summary>Creates a new access control rule for the specified user, with the specified access rights, access control, and flags.</summary>
/// <returns>An <see cref="T:System.Security.AccessControl.EventWaitHandleAccessRule" /> object representing the specified rights for the specified user.</returns>
/// <param name="identityReference">An <see cref="T:System.Security.Principal.IdentityReference" /> that identifies the user or group the rule applies to.</param>
/// <param name="accessMask">A bitwise combination of <see cref="T:System.Security.AccessControl.EventWaitHandleRights" /> values specifying the access rights to allow or deny, cast to an integer.</param>
/// <param name="isInherited">Meaningless for named wait handles, because they have no hierarchy.</param>
/// <param name="inheritanceFlags">Meaningless for named wait handles, because they have no hierarchy.</param>
/// <param name="propagationFlags">Meaningless for named wait handles, because they have no hierarchy.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="accessMask" />, <paramref name="inheritanceFlags" />, <paramref name="propagationFlags" />, or <paramref name="type" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identityReference" /> is null. -or-<paramref name="accessMask" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identityReference" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" />, nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002D3D RID: 11581 RVA: 0x00093878 File Offset: 0x00091A78
public override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
{
return new EventWaitHandleAccessRule(identityReference, (EventWaitHandleRights)accessMask, type);
}
/// <summary>Searches for a matching access control rule with which the new rule can be merged. If none are found, adds the new rule.</summary>
/// <param name="rule">The access control rule to add.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D3E RID: 11582 RVA: 0x00093884 File Offset: 0x00091A84
[MonoTODO]
public void AddAccessRule(EventWaitHandleAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an access control rule with the same user and <see cref="T:System.Security.AccessControl.AccessControlType" /> (allow or deny) as the specified access rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it.</summary>
/// <returns>true if a compatible rule is found; otherwise, false.</returns>
/// <param name="rule">An <see cref="T:System.Security.AccessControl.EventWaitHandleAccessRule" /> that specifies the user and <see cref="T:System.Security.AccessControl.AccessControlType" /> to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D3F RID: 11583 RVA: 0x0009388C File Offset: 0x00091A8C
[MonoTODO]
public bool RemoveAccessRule(EventWaitHandleAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for all access control rules with the same user and <see cref="T:System.Security.AccessControl.AccessControlType" /> (allow or deny) as the specified rule and, if found, removes them.</summary>
/// <param name="rule">An <see cref="T:System.Security.AccessControl.EventWaitHandleAccessRule" /> that specifies the user and <see cref="T:System.Security.AccessControl.AccessControlType" /> to search for. Any rights specified by this rule are ignored.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D40 RID: 11584 RVA: 0x00093894 File Offset: 0x00091A94
[MonoTODO]
public void RemoveAccessRuleAll(EventWaitHandleAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an access control rule that exactly matches the specified rule and, if found, removes it.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.EventWaitHandleAccessRule" /> to remove.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D41 RID: 11585 RVA: 0x0009389C File Offset: 0x00091A9C
[MonoTODO]
public void RemoveAccessRuleSpecific(EventWaitHandleAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access control rules with the same user as the specified rule, regardless of <see cref="T:System.Security.AccessControl.AccessControlType" />, and then adds the specified rule.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.EventWaitHandleAccessRule" /> to add. The user specified by this rule determines the rules to remove before this rule is added.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D42 RID: 11586 RVA: 0x000938A4 File Offset: 0x00091AA4
[MonoTODO]
public void ResetAccessRule(EventWaitHandleAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access control rules with the same user and <see cref="T:System.Security.AccessControl.AccessControlType" /> (allow or deny) as the specified rule, and then adds the specified rule.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.EventWaitHandleAccessRule" /> to add. The user and <see cref="T:System.Security.AccessControl.AccessControlType" /> of this rule determine the rules to remove before this rule is added.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D43 RID: 11587 RVA: 0x000938AC File Offset: 0x00091AAC
[MonoTODO]
public void SetAccessRule(EventWaitHandleAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule.</summary>
/// <returns>An <see cref="T:System.Security.AccessControl.EventWaitHandleAuditRule" /> object representing the specified audit rule for the specified user. The return type of the method is the base class, <see cref="T:System.Security.AccessControl.AuditRule" />, but the return value can be cast safely to the derived class.</returns>
/// <param name="identityReference">An <see cref="T:System.Security.Principal.IdentityReference" /> that identifies the user or group the rule applies to.</param>
/// <param name="accessMask">A bitwise combination of <see cref="T:System.Security.AccessControl.EventWaitHandleRights" /> values specifying the access rights to audit, cast to an integer.</param>
/// <param name="isInherited">Meaningless for named wait handles, because they have no hierarchy.</param>
/// <param name="inheritanceFlags">Meaningless for named wait handles, because they have no hierarchy.</param>
/// <param name="propagationFlags">Meaningless for named wait handles, because they have no hierarchy.</param>
/// <param name="flags">A bitwise combination of <see cref="T:System.Security.AccessControl.AuditFlags" /> values specifying whether to audit successful access, failed access, or both.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="accessMask" />, <paramref name="inheritanceFlags" />, <paramref name="propagationFlags" />, or <paramref name="flags" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identityReference" /> is null. -or-<paramref name="accessMask" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identityReference" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" />, nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002D44 RID: 11588 RVA: 0x000938B4 File Offset: 0x00091AB4
public override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
{
return new EventWaitHandleAuditRule(identityReference, (EventWaitHandleRights)accessMask, flags);
}
/// <summary>Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule.</summary>
/// <param name="rule">The audit rule to add. The user specified by this rule determines the search.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D45 RID: 11589 RVA: 0x000938C0 File Offset: 0x00091AC0
[MonoTODO]
public void AddAuditRule(EventWaitHandleAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an audit rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it.</summary>
/// <returns>true if a compatible rule is found; otherwise, false.</returns>
/// <param name="rule">An <see cref="T:System.Security.AccessControl.EventWaitHandleAuditRule" /> that specifies the user to search for and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D46 RID: 11590 RVA: 0x000938C8 File Offset: 0x00091AC8
[MonoTODO]
public bool RemoveAuditRule(EventWaitHandleAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for all audit rules with the same user as the specified rule and, if found, removes them.</summary>
/// <param name="rule">An <see cref="T:System.Security.AccessControl.EventWaitHandleAuditRule" /> that specifies the user to search for. Any rights specified by this rule are ignored.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D47 RID: 11591 RVA: 0x000938D0 File Offset: 0x00091AD0
[MonoTODO]
public void RemoveAuditRuleAll(EventWaitHandleAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an audit rule that exactly matches the specified rule and, if found, removes it.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.EventWaitHandleAuditRule" /> to remove.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D48 RID: 11592 RVA: 0x000938D8 File Offset: 0x00091AD8
[MonoTODO]
public void RemoveAuditRuleSpecific(EventWaitHandleAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules with the same user as the specified rule, regardless of the <see cref="T:System.Security.AccessControl.AuditFlags" /> value, and then adds the specified rule.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.EventWaitHandleAuditRule" /> to add. The user specified by this rule determines the rules to remove before this rule is added.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002D49 RID: 11593 RVA: 0x000938E0 File Offset: 0x00091AE0
[MonoTODO]
public void SetAuditRule(EventWaitHandleAuditRule rule)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,40 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Represents the access control and audit security for a file. This class cannot be inherited.</summary>
// Token: 0x020004C1 RID: 1217
public sealed class FileSecurity : FileSystemSecurity
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSecurity" /> class. </summary>
/// <exception cref="T:System.PlatformNotSupportedException">The current operating system is not Microsoft Windows 2000 or later.</exception>
// Token: 0x06002D4A RID: 11594 RVA: 0x000938E8 File Offset: 0x00091AE8
public FileSecurity()
: base(false)
{
throw new PlatformNotSupportedException();
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSecurity" /> class from a specified file using the specified values of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration.</summary>
/// <param name="fileName">The location of a file to create a <see cref="T:System.Security.AccessControl.FileSecurity" /> object from.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> values that specifies the type of access control list (ACL) information to retrieve. </param>
/// <exception cref="T:System.ArgumentException">The <paramref name="fileName" /> parameter is a zero-length string, contains only white space, or contains one or more invalid characters as defined by <see cref="F:System.IO.Path.InvalidPathChars" />. </exception>
/// <exception cref="T:System.IO.DirectoryNotFoundException">The specified path is invalid, (for example, it is on an unmapped drive). </exception>
/// <exception cref="T:System.IO.FileNotFoundException">The file specified in the <paramref name="fileName" /> parameter was not found. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurred while opening the file.</exception>
/// <exception cref="T:System.NotSupportedException">
/// <paramref name="path" /> is in an invalid format. </exception>
/// <exception cref="T:System.Runtime.InteropServices.SEHException">The <paramref name="fileName" /> parameter is null.</exception>
/// <exception cref="T:System.PlatformNotSupportedException">The current operating system is not Microsoft Windows 2000 or later.</exception>
/// <exception cref="T:System.IO.PathTooLongException">The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. </exception>
/// <exception cref="T:System.Security.AccessControl.PrivilegeNotHeldException">The current system account does not have administrative privileges.</exception>
/// <exception cref="T:System.SystemException">The file could not be found.</exception>
/// <exception cref="T:System.UnauthorizedAccessException">The <paramref name="fileName" /> parameter specified a file that is read-only.-or- This operation is not supported on the current platform.-or- The <paramref name="fileName" /> parameter specified a directory.-or- The caller does not have the required permission.</exception>
// Token: 0x06002D4B RID: 11595 RVA: 0x000938F8 File Offset: 0x00091AF8
public FileSecurity(string fileName, AccessControlSections includeSections)
: base(false, fileName, includeSections)
{
throw new PlatformNotSupportedException();
}
}
}
@@ -0,0 +1,80 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents an abstraction of an access control entry (ACE) that defines an access rule for a file or directory. This class cannot be inherited.</summary>
// Token: 0x020004C2 RID: 1218
public sealed class FileSystemAccessRule : AccessRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> class using a reference to a user account, a value that specifies the type of operation associated with the access rule, and a value that specifies whether to allow or deny the operation. </summary>
/// <param name="identity">An <see cref="T:System.Security.Principal.IdentityReference" /> object that encapsulates a reference to a user account.</param>
/// <param name="fileSystemRights">One of the <see cref="T:System.Security.AccessControl.FileSystemRights" /> values that specifies the type of operation associated with the access rule. </param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values that specifies whether to allow or deny the operation.</param>
/// <exception cref="T:System.ArgumentException">The <paramref name="identity" /> parameter is not an <see cref="T:System.Security.Principal.IdentityReference" /> object.</exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="identity" /> parameter is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">An incorrect enumeration was passed to the <paramref name="type " />parameter.</exception>
// Token: 0x06002D4C RID: 11596 RVA: 0x00093908 File Offset: 0x00091B08
public FileSystemAccessRule(IdentityReference identity, FileSystemRights fileSystemRights, AccessControlType type)
: this(identity, fileSystemRights, InheritanceFlags.None, PropagationFlags.None, type)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> class using the name of a user account, a value that specifies the type of operation associated with the access rule, and a value that describes whether to allow or deny the operation. </summary>
/// <param name="identity">The name of a user account.</param>
/// <param name="fileSystemRights">One of the <see cref="T:System.Security.AccessControl.FileSystemRights" /> values that specifies the type of operation associated with the access rule. </param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values that specifies whether to allow or deny the operation.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="identity" /> parameter is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">An incorrect enumeration was passed to the <paramref name="type " />parameter.</exception>
// Token: 0x06002D4D RID: 11597 RVA: 0x00093918 File Offset: 0x00091B18
public FileSystemAccessRule(string identity, FileSystemRights fileSystemRights, AccessControlType type)
: this(new SecurityIdentifier(identity), fileSystemRights, InheritanceFlags.None, PropagationFlags.None, type)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> class using a reference to a user account, a value that specifies the type of operation associated with the access rule, a value that determines how rights are inherited, a value that determines how rights are propagated, and a value that specifies whether to allow or deny the operation.</summary>
/// <param name="identity">An <see cref="T:System.Security.Principal.IdentityReference" /> object that encapsulates a reference to a user account.</param>
/// <param name="fileSystemRights">One of the <see cref="T:System.Security.AccessControl.FileSystemRights" /> values that specifies the type of operation associated with the access rule.</param>
/// <param name="inheritanceFlags">One of the <see cref="T:System.Security.AccessControl.InheritanceFlags" /> values that specifies how access masks are propagated to child objects.</param>
/// <param name="propagationFlags">One of the <see cref="T:System.Security.AccessControl.PropagationFlags" /> values that specifies how Access Control Entries (ACEs) are propagated to child objects.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values that specifies whether to allow or deny the operation.</param>
/// <exception cref="T:System.ArgumentException">The <paramref name="identity" /> parameter is not an <see cref="T:System.Security.Principal.IdentityReference" /> object.</exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="identity" /> parameter is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">An incorrect enumeration was passed to the <paramref name="type " />parameter.-or-An incorrect enumeration was passed to the <paramref name="inheritanceFlags " />parameter.-or-An incorrect enumeration was passed to the <paramref name="propagationFlags " />parameter.</exception>
// Token: 0x06002D4E RID: 11598 RVA: 0x0009392C File Offset: 0x00091B2C
public FileSystemAccessRule(IdentityReference identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
: base(identity, (int)fileSystemRights, false, inheritanceFlags, propagationFlags, type)
{
this.rights = fileSystemRights;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> class using the name of a user account, a value that specifies the type of operation associated with the access rule, a value that determines how rights are inherited, a value that determines how rights are propagated, and a value that specifies whether to allow or deny the operation.</summary>
/// <param name="identity">The name of a user account.</param>
/// <param name="fileSystemRights">One of the <see cref="T:System.Security.AccessControl.FileSystemRights" /> values that specifies the type of operation associated with the access rule.</param>
/// <param name="inheritanceFlags">One of the <see cref="T:System.Security.AccessControl.InheritanceFlags" /> values that specifies how access masks are propagated to child objects.</param>
/// <param name="propagationFlags">One of the <see cref="T:System.Security.AccessControl.PropagationFlags" /> values that specifies how Access Control Entries (ACEs) are propagated to child objects.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values that specifies whether to allow or deny the operation.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="identity" /> parameter is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">An incorrect enumeration was passed to the <paramref name="type " />parameter.-or-An incorrect enumeration was passed to the <paramref name="inheritanceFlags " />parameter.-or-An incorrect enumeration was passed to the <paramref name="propagationFlags " />parameter.</exception>
// Token: 0x06002D4F RID: 11599 RVA: 0x00093944 File Offset: 0x00091B44
public FileSystemAccessRule(string identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
: this(new SecurityIdentifier(identity), fileSystemRights, inheritanceFlags, propagationFlags, type)
{
}
/// <summary>Gets the <see cref="T:System.Security.AccessControl.FileSystemRights" /> flags associated with the current <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> object.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.FileSystemRights" /> flags associated with the current <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> object.</returns>
// Token: 0x170008DF RID: 2271
// (get) Token: 0x06002D50 RID: 11600 RVA: 0x00093958 File Offset: 0x00091B58
public FileSystemRights FileSystemRights
{
get
{
return this.rights;
}
}
// Token: 0x040011DE RID: 4574
private FileSystemRights rights;
}
}
@@ -0,0 +1,77 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents an abstraction of an access control entry (ACE) that defines an audit rule for a file or directory. This class cannot be inherited.</summary>
// Token: 0x020004C3 RID: 1219
public sealed class FileSystemAuditRule : AuditRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> class using a reference to a user account, a value that specifies the type of operation associated with the audit rule, and a value that specifies when to perform auditing. </summary>
/// <param name="identity">An <see cref="T:System.Security.Principal.IdentityReference" /> object that encapsulates a reference to a user account.</param>
/// <param name="fileSystemRights">One of the <see cref="T:System.Security.AccessControl.FileSystemRights" /> values that specifies the type of operation associated with the audit rule. </param>
/// <param name="flags">One of the <see cref="T:System.Security.AccessControl.AuditFlags" /> values that specifies when to perform auditing.</param>
/// <exception cref="T:System.ArgumentException">The <paramref name="identity" /> parameter is not an <see cref="T:System.Security.Principal.IdentityReference" /> object.</exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="identity" /> parameter is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">An incorrect enumeration was passed to the <paramref name="flags" /> parameter.-or-The <see cref="F:System.Security.AccessControl.AuditFlags.None" /> value was passed to the <paramref name="flags" /> parameter.</exception>
// Token: 0x06002D51 RID: 11601 RVA: 0x00093960 File Offset: 0x00091B60
public FileSystemAuditRule(IdentityReference identity, FileSystemRights fileSystemRights, AuditFlags flags)
: this(identity, fileSystemRights, InheritanceFlags.None, PropagationFlags.None, flags)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> class using a user account name, a value that specifies the type of operation associated with the audit rule, and a value that specifies when to perform auditing.</summary>
/// <param name="identity">The name of a user account.</param>
/// <param name="fileSystemRights">One of the <see cref="T:System.Security.AccessControl.FileSystemRights" /> values that specifies the type of operation associated with the audit rule. </param>
/// <param name="flags">One of the <see cref="T:System.Security.AccessControl.AuditFlags" /> values that specifies when to perform auditing.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">An incorrect enumeration was passed to the <paramref name="flags" /> parameter.-or-The <see cref="F:System.Security.AccessControl.AuditFlags.None" /> value was passed to the <paramref name="flags" /> parameter.</exception>
// Token: 0x06002D52 RID: 11602 RVA: 0x00093970 File Offset: 0x00091B70
public FileSystemAuditRule(string identity, FileSystemRights fileSystemRights, AuditFlags flags)
: this(new SecurityIdentifier(identity), fileSystemRights, flags)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> class using the name of a reference to a user account, a value that specifies the type of operation associated with the audit rule, a value that determines how rights are inherited, a value that determines how rights are propagated, and a value that specifies when to perform auditing. </summary>
/// <param name="identity">An <see cref="T:System.Security.Principal.IdentityReference" /> object that encapsulates a reference to a user account.</param>
/// <param name="fileSystemRights">One of the <see cref="T:System.Security.AccessControl.FileSystemRights" /> values that specifies the type of operation associated with the audit rule.</param>
/// <param name="inheritanceFlags">One of the <see cref="T:System.Security.AccessControl.InheritanceFlags" /> values that specifies how access masks are propagated to child objects.</param>
/// <param name="propagationFlags">One of the <see cref="T:System.Security.AccessControl.PropagationFlags" /> values that specifies how Access Control Entries (ACEs) are propagated to child objects.</param>
/// <param name="flags">One of the <see cref="T:System.Security.AccessControl.AuditFlags" /> values that specifies when to perform auditing.</param>
/// <exception cref="T:System.ArgumentException">The <paramref name="identity" /> parameter is not an <see cref="T:System.Security.Principal.IdentityReference" /> object.</exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="identity" /> parameter is null.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">An incorrect enumeration was passed to the <paramref name="flags" /> parameter.-or-The <see cref="F:System.Security.AccessControl.AuditFlags.None" /> value was passed to the <paramref name="flags" /> parameter.</exception>
// Token: 0x06002D53 RID: 11603 RVA: 0x00093980 File Offset: 0x00091B80
public FileSystemAuditRule(IdentityReference identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
: base(identity, 0, false, inheritanceFlags, propagationFlags, flags)
{
this.rights = fileSystemRights;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> class using the name of a user account, a value that specifies the type of operation associated with the audit rule, a value that determines how rights are inherited, a value that determines how rights are propagated, and a value that specifies when to perform auditing. </summary>
/// <param name="identity">The name of a user account.</param>
/// <param name="fileSystemRights">One of the <see cref="T:System.Security.AccessControl.FileSystemRights" /> values that specifies the type of operation associated with the audit rule.</param>
/// <param name="inheritanceFlags">One of the <see cref="T:System.Security.AccessControl.InheritanceFlags" /> values that specifies how access masks are propagated to child objects.</param>
/// <param name="propagationFlags">One of the <see cref="T:System.Security.AccessControl.PropagationFlags" /> values that specifies how Access Control Entries (ACEs) are propagated to child objects.</param>
/// <param name="flags">One of the <see cref="T:System.Security.AccessControl.AuditFlags" /> values that specifies when to perform auditing.</param>
// Token: 0x06002D54 RID: 11604 RVA: 0x00093998 File Offset: 0x00091B98
public FileSystemAuditRule(string identity, FileSystemRights fileSystemRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
: this(new SecurityIdentifier(identity), fileSystemRights, inheritanceFlags, propagationFlags, flags)
{
}
/// <summary>Gets the <see cref="T:System.Security.AccessControl.FileSystemRights" /> flags associated with the current <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.FileSystemRights" /> flags associated with the current <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object.</returns>
// Token: 0x170008E0 RID: 2272
// (get) Token: 0x06002D55 RID: 11605 RVA: 0x000939AC File Offset: 0x00091BAC
public FileSystemRights FileSystemRights
{
get
{
return this.rights;
}
}
// Token: 0x040011DF RID: 4575
private FileSystemRights rights;
}
}
@@ -0,0 +1,80 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Defines the access rights to use when creating access and audit rules. </summary>
// Token: 0x020004C4 RID: 1220
[Flags]
public enum FileSystemRights
{
/// <summary>Specifies the right to read the contents of a directory.</summary>
// Token: 0x040011E1 RID: 4577
ListDirectory = 1,
/// <summary>Specifies the right to open and copy a file or folder. This does not include the right to read file system attributes, extended file system attributes, or access and audit rules.</summary>
// Token: 0x040011E2 RID: 4578
ReadData = 1,
/// <summary>Specifies the right to create a file. </summary>
// Token: 0x040011E3 RID: 4579
CreateFiles = 2,
/// <summary>Specifies the right to open and write to a file or folder. This does not include the right to open and write file system attributes, extended file system attributes, or access and audit rules.</summary>
// Token: 0x040011E4 RID: 4580
WriteData = 2,
/// <summary>Specifies the right to append data to the end of a file.</summary>
// Token: 0x040011E5 RID: 4581
AppendData = 4,
/// <summary>Specifies the right to create a folder. </summary>
// Token: 0x040011E6 RID: 4582
CreateDirectories = 4,
/// <summary>Specifies the right to open and copy extended file system attributes from a folder or file. For example, this value specifies the right to view author and content information. This does not include the right to read data, file system attributes, or access and audit rules.</summary>
// Token: 0x040011E7 RID: 4583
ReadExtendedAttributes = 8,
/// <summary>Specifies the right to open and write extended file system attributes to a folder or file. This does not include the ability to write data, attributes, or access and audit rules.</summary>
// Token: 0x040011E8 RID: 4584
WriteExtendedAttributes = 16,
/// <summary>Specifies the right to run an application file.</summary>
// Token: 0x040011E9 RID: 4585
ExecuteFile = 32,
/// <summary>Specifies the right to list the contents of a folder and to run applications contained within that folder.</summary>
// Token: 0x040011EA RID: 4586
Traverse = 32,
/// <summary>Specifies the right to delete a folder and any files contained within that folder.</summary>
// Token: 0x040011EB RID: 4587
DeleteSubdirectoriesAndFiles = 64,
/// <summary>Specifies the right to open and copy file system attributes from a folder or file. For example, this value specifies the right to view the file creation or modified date. This does not include the right to read data, extended file system attributes, or access and audit rules.</summary>
// Token: 0x040011EC RID: 4588
ReadAttributes = 128,
/// <summary>Specifies the right to open and write file system attributes to a folder or file. This does not include the ability to write data, extended attributes, or access and audit rules.</summary>
// Token: 0x040011ED RID: 4589
WriteAttributes = 256,
/// <summary>Specifies the right to create folders and files, and to add or remove data from files. This right includes the <see cref="F:System.Security.AccessControl.FileSystemRights.WriteData" /> right, <see cref="F:System.Security.AccessControl.FileSystemRights.AppendData" /> right, <see cref="F:System.Security.AccessControl.FileSystemRights.WriteExtendedAttributes" /> right, and <see cref="F:System.Security.AccessControl.FileSystemRights.WriteAttributes" /> right. </summary>
// Token: 0x040011EE RID: 4590
Write = 278,
/// <summary>Specifies the right to delete a folder or file. </summary>
// Token: 0x040011EF RID: 4591
Delete = 65536,
/// <summary>Specifies the right to open and copy access and audit rules from a folder or file. This does not include the right to read data, file system attributes, and extended file system attributes. </summary>
// Token: 0x040011F0 RID: 4592
ReadPermissions = 131072,
/// <summary>Specifies the right to open and copy folders or files as read-only. This right includes the <see cref="F:System.Security.AccessControl.FileSystemRights.ReadData" /> right, <see cref="F:System.Security.AccessControl.FileSystemRights.ReadExtendedAttributes" /> right, <see cref="F:System.Security.AccessControl.FileSystemRights.ReadAttributes" /> right, and <see cref="F:System.Security.AccessControl.FileSystemRights.ReadPermissions" /> right.</summary>
// Token: 0x040011F1 RID: 4593
Read = 131209,
/// <summary>Specifies the right to open and copy folders or files as read-only, and to run application files. This right includes the <see cref="F:System.Security.AccessControl.FileSystemRights.Read" /> right and the <see cref="F:System.Security.AccessControl.FileSystemRights.ExecuteFile" /> right.</summary>
// Token: 0x040011F2 RID: 4594
ReadAndExecute = 131241,
/// <summary>Specifies the right to read, write, list folder contents, delete folders and files, and run application files. This right includes the <see cref="F:System.Security.AccessControl.FileSystemRights.ReadAndExecute" /> right, the <see cref="F:System.Security.AccessControl.FileSystemRights.Write" /> right, and the <see cref="F:System.Security.AccessControl.FileSystemRights.Delete" /> right.</summary>
// Token: 0x040011F3 RID: 4595
Modify = 197055,
/// <summary>Specifies the right to change the security and audit rules associated with a file or folder.</summary>
// Token: 0x040011F4 RID: 4596
ChangePermissions = 262144,
/// <summary>Specifies the right to change the owner of a folder or file. Note that owners of a resource have full access to that resource.</summary>
// Token: 0x040011F5 RID: 4597
TakeOwnership = 524288,
/// <summary>Specifies whether the application can wait for a file handle to synchronize with the completion of an I/O operation.</summary>
// Token: 0x040011F6 RID: 4598
Synchronize = 1048576,
/// <summary>Specifies the right to exert full control over a folder or file, and to modify access control and audit rules. This value represents the right to do anything with a file and is the combination of all rights in this enumeration.</summary>
// Token: 0x040011F7 RID: 4599
FullControl = 2032127
}
}
@@ -0,0 +1,206 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents the access control and audit security for a file or directory.</summary>
// Token: 0x020004C5 RID: 1221
public abstract class FileSystemSecurity : NativeObjectSecurity
{
// Token: 0x06002D56 RID: 11606 RVA: 0x000939B4 File Offset: 0x00091BB4
internal FileSystemSecurity(bool isContainer)
: base(isContainer, ResourceType.FileObject)
{
}
// Token: 0x06002D57 RID: 11607 RVA: 0x000939C0 File Offset: 0x00091BC0
internal FileSystemSecurity(bool isContainer, string name, AccessControlSections includeSections)
: base(isContainer, ResourceType.FileObject, name, includeSections)
{
}
/// <summary>Gets the enumeration that the <see cref="T:System.Security.AccessControl.FileSystemSecurity" /> class uses to represent access rights.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.FileSystemRights" /> enumeration.</returns>
// Token: 0x170008E1 RID: 2273
// (get) Token: 0x06002D58 RID: 11608 RVA: 0x000939CC File Offset: 0x00091BCC
public override Type AccessRightType
{
get
{
return typeof(FileSystemRights);
}
}
/// <summary>Gets the enumeration that the <see cref="T:System.Security.AccessControl.FileSystemSecurity" /> class uses to represent access rules.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> class.</returns>
// Token: 0x170008E2 RID: 2274
// (get) Token: 0x06002D59 RID: 11609 RVA: 0x000939D8 File Offset: 0x00091BD8
public override Type AccessRuleType
{
get
{
return typeof(FileSystemAccessRule);
}
}
/// <summary>Gets the type that the <see cref="T:System.Security.AccessControl.FileSystemSecurity" /> class uses to represent audit rules.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> class.</returns>
// Token: 0x170008E3 RID: 2275
// (get) Token: 0x06002D5A RID: 11610 RVA: 0x000939E4 File Offset: 0x00091BE4
public override Type AuditRuleType
{
get
{
return typeof(FileSystemAuditRule);
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> class that represents a new access control rule for the specified user, with the specified access rights, access control, and flags.</summary>
/// <returns>A new <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> object that represents a new access control rule for the specified user, with the specified access rights, access control, and flags.</returns>
/// <param name="identityReference">An <see cref="T:System.Security.Principal.IdentityReference" /> object that represents a user account.</param>
/// <param name="accessMask">An integer that specifies an access type.</param>
/// <param name="isInherited">true if the access rule is inherited; otherwise, false. </param>
/// <param name="inheritanceFlags">One of the <see cref="T:System.Security.AccessControl.InheritanceFlags" /> values that specifies how to propagate access masks to child objects.</param>
/// <param name="propagationFlags">One of the <see cref="T:System.Security.AccessControl.PropagationFlags" /> values that specifies how to propagate Access Control Entries (ACEs) to child objects.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values that specifies whether access is allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="accessMask" />, <paramref name="inheritanceFlags" />, <paramref name="propagationFlags" />, or <paramref name="type" /> parameters specify an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="identityReference" /> parameter is null. -or-The <paramref name="accessMask" /> parameter is zero.</exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="identityReference" /> parameter is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" />, nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002D5B RID: 11611 RVA: 0x000939F0 File Offset: 0x00091BF0
[MonoTODO]
public sealed override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
{
return new FileSystemAccessRule(identityReference, (FileSystemRights)accessMask, inheritanceFlags, propagationFlags, type);
}
/// <summary>Adds the specified access control list (ACL) permission to the current file or directory.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> object that represents an access control list (ACL) permission to add to a file or directory. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D5C RID: 11612 RVA: 0x00093A00 File Offset: 0x00091C00
[MonoTODO]
public void AddAccessRule(FileSystemAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all matching allow or deny access control list (ACL) permissions from the current file or directory.</summary>
/// <returns>true if the access rule was removed; otherwise, false.</returns>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> object that represents an access control list (ACL) permission to remove from a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D5D RID: 11613 RVA: 0x00093A08 File Offset: 0x00091C08
[MonoTODO]
public bool RemoveAccessRule(FileSystemAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access control list (ACL) permissions for the specified user from the current file or directory.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> object that specifies a user whose access control list (ACL) permissions should be removed from a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D5E RID: 11614 RVA: 0x00093A10 File Offset: 0x00091C10
[MonoTODO]
public void RemoveAccessRuleAll(FileSystemAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes a single matching allow or deny access control list (ACL) permission from the current file or directory.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> object that specifies a user whose access control list (ACL) permissions should be removed from a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D5F RID: 11615 RVA: 0x00093A18 File Offset: 0x00091C18
[MonoTODO]
public void RemoveAccessRuleSpecific(FileSystemAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Adds the specified access control list (ACL) permission to the current file or directory and removes all matching ACL permissions.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> object that represents an access control list (ACL) permission to add to a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D60 RID: 11616 RVA: 0x00093A20 File Offset: 0x00091C20
[MonoTODO]
public void ResetAccessRule(FileSystemAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Sets the specified access control list (ACL) permission for the current file or directory. </summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAccessRule" /> object that represents an access control list (ACL) permission to set for a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D61 RID: 11617 RVA: 0x00093A28 File Offset: 0x00091C28
[MonoTODO]
public void SetAccessRule(FileSystemAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> class representing the specified audit rule for the specified user.</summary>
/// <returns>A new <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object representing the specified audit rule for the specified user.</returns>
/// <param name="identityReference">An <see cref="T:System.Security.Principal.IdentityReference" /> object that represents a user account.</param>
/// <param name="accessMask">An integer that specifies an access type.</param>
/// <param name="isInherited">true if the access rule is inherited; otherwise, false. </param>
/// <param name="inheritanceFlags">One of the <see cref="T:System.Security.AccessControl.InheritanceFlags" /> values that specifies how to propagate access masks to child objects.</param>
/// <param name="propagationFlags">One of the <see cref="T:System.Security.AccessControl.PropagationFlags" /> values that specifies how to propagate Access Control Entries (ACEs) to child objects.</param>
/// <param name="flags">One of the <see cref="T:System.Security.AccessControl.AuditFlags" /> values that specifies the type of auditing to perform.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="accessMask" />, <paramref name="inheritanceFlags" />, <paramref name="propagationFlags" />, or <paramref name="flags" /> properties specify an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="identityReference" /> property is null. -or-The <paramref name="accessMask" /> property is zero.</exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="identityReference" /> property is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" />, nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002D62 RID: 11618 RVA: 0x00093A30 File Offset: 0x00091C30
[MonoTODO]
public sealed override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
{
return new FileSystemAuditRule(identityReference, (FileSystemRights)accessMask, inheritanceFlags, propagationFlags, flags);
}
/// <summary>Adds the specified audit rule to the current file or directory.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object that represents an audit rule to add to a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D63 RID: 11619 RVA: 0x00093A40 File Offset: 0x00091C40
[MonoTODO]
public void AddAuditRule(FileSystemAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all matching allow or deny audit rules from the current file or directory.</summary>
/// <returns>true if the audit rule was removed; otherwise, false</returns>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object that represents an audit rule to remove from a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D64 RID: 11620 RVA: 0x00093A48 File Offset: 0x00091C48
[MonoTODO]
public bool RemoveAuditRule(FileSystemAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules for the specified user from the current file or directory.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object that specifies a user whose audit rules should be removed from a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D65 RID: 11621 RVA: 0x00093A50 File Offset: 0x00091C50
[MonoTODO]
public void RemoveAuditRuleAll(FileSystemAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes a single matching allow or deny audit rule from the current file or directory.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object that represents an audit rule to remove from a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D66 RID: 11622 RVA: 0x00093A58 File Offset: 0x00091C58
[MonoTODO]
public void RemoveAuditRuleSpecific(FileSystemAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Sets the specified audit rule for the current file or directory.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.FileSystemAuditRule" /> object that represents an audit rule to set for a file or directory.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rule" /> parameter is null.</exception>
// Token: 0x06002D67 RID: 11623 RVA: 0x00093A60 File Offset: 0x00091C60
[MonoTODO]
public void SetAuditRule(FileSystemAuditRule rule)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,201 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Represents an Access Control Entry (ACE), and is the base class for all other ACE classes.</summary>
// Token: 0x020004C6 RID: 1222
public abstract class GenericAce
{
// Token: 0x06002D68 RID: 11624 RVA: 0x00093A68 File Offset: 0x00091C68
internal GenericAce(InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
this.inheritance = inheritanceFlags;
this.propagation = propagationFlags;
}
// Token: 0x06002D69 RID: 11625 RVA: 0x00093A80 File Offset: 0x00091C80
internal GenericAce(AceType type)
{
if (type <= AceType.SystemAlarmCallbackObject)
{
throw new ArgumentOutOfRangeException("type");
}
this.ace_type = type;
}
/// <summary>Gets or sets the <see cref="T:System.Security.AccessControl.AceFlags" /> associated with this <see cref="T:System.Security.AccessControl.GenericAce" /> object.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.AceFlags" /> associated with this <see cref="T:System.Security.AccessControl.GenericAce" /> object.</returns>
// Token: 0x170008E4 RID: 2276
// (get) Token: 0x06002D6A RID: 11626 RVA: 0x00093AB0 File Offset: 0x00091CB0
// (set) Token: 0x06002D6B RID: 11627 RVA: 0x00093AB8 File Offset: 0x00091CB8
public AceFlags AceFlags
{
get
{
return this.aceflags;
}
set
{
this.aceflags = value;
}
}
/// <summary>Gets the type of this Access Control Entry (ACE).</summary>
/// <returns>The type of this ACE.</returns>
// Token: 0x170008E5 RID: 2277
// (get) Token: 0x06002D6C RID: 11628 RVA: 0x00093AC4 File Offset: 0x00091CC4
public AceType AceType
{
get
{
return this.ace_type;
}
}
/// <summary>Gets the audit information associated with this Access Control Entry (ACE).</summary>
/// <returns>The audit information associated with this Access Control Entry (ACE).</returns>
// Token: 0x170008E6 RID: 2278
// (get) Token: 0x06002D6D RID: 11629 RVA: 0x00093ACC File Offset: 0x00091CCC
public AuditFlags AuditFlags
{
get
{
AuditFlags auditFlags = AuditFlags.None;
if ((byte)(this.aceflags & AceFlags.SuccessfulAccess) != 0)
{
auditFlags |= AuditFlags.Success;
}
if ((byte)(this.aceflags & AceFlags.FailedAccess) != 0)
{
auditFlags |= AuditFlags.Failure;
}
return auditFlags;
}
}
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.GenericAce" /> object. This length should be used before marshaling the ACL into a binary array with the <see cref="M:System.Security.AccessControl.GenericAce.GetBinaryForm" /> method.</summary>
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.GenericAce" /> object.</returns>
// Token: 0x170008E7 RID: 2279
// (get) Token: 0x06002D6E RID: 11630
public abstract int BinaryLength { get; }
/// <summary>Gets flags that specify the inheritance properties of this Access Control Entry (ACE).</summary>
/// <returns>Flags that specify the inheritance properties of this ACE.</returns>
// Token: 0x170008E8 RID: 2280
// (get) Token: 0x06002D6F RID: 11631 RVA: 0x00093B08 File Offset: 0x00091D08
public InheritanceFlags InheritanceFlags
{
get
{
return this.inheritance;
}
}
/// <summary>Gets a Boolean value that specifies whether this Access Control Entry (ACE) is inherited or is set explicitly.</summary>
/// <returns>true if this ACE is inherited; otherwise, false.</returns>
// Token: 0x170008E9 RID: 2281
// (get) Token: 0x06002D70 RID: 11632 RVA: 0x00093B10 File Offset: 0x00091D10
[MonoTODO]
public bool IsInherited
{
get
{
return false;
}
}
/// <summary>Gets flags that specify the inheritance propagation properties of this Access Control Entry (ACE).</summary>
/// <returns>Flags that specify the inheritance propagation properties of this ACE.</returns>
// Token: 0x170008EA RID: 2282
// (get) Token: 0x06002D71 RID: 11633 RVA: 0x00093B14 File Offset: 0x00091D14
public PropagationFlags PropagationFlags
{
get
{
return this.propagation;
}
}
/// <summary>Creates a deep copy of this Access Control Entry (ACE).</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.GenericAce" /> object that this method creates.</returns>
// Token: 0x06002D72 RID: 11634 RVA: 0x00093B1C File Offset: 0x00091D1C
[MonoTODO]
public GenericAce Copy()
{
throw new NotImplementedException();
}
/// <summary>Creates a <see cref="T:System.Security.AccessControl.GenericAce" /> object from the specified binary data.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.GenericAce" /> object this method creates.</returns>
/// <param name="binaryForm">The binary data from which to create the new <see cref="T:System.Security.AccessControl.GenericAce" /> object.</param>
/// <param name="offset">The offset at which to begin unmarshaling.</param>
// Token: 0x06002D73 RID: 11635 RVA: 0x00093B24 File Offset: 0x00091D24
[MonoTODO]
public static GenericAce CreateFromBinaryForm(byte[] binaryForm, int offset)
{
throw new NotImplementedException();
}
/// <summary>Determines whether the specified <see cref="T:System.Security.AccessControl.GenericAce" /> object is equal to the current <see cref="T:System.Security.AccessControl.GenericAce" /> object.</summary>
/// <returns>true if the specified <see cref="T:System.Security.AccessControl.GenericAce" /> object is equal to the current <see cref="T:System.Security.AccessControl.GenericAce" /> object; otherwise, false.</returns>
/// <param name="o">The <see cref="T:System.Security.AccessControl.GenericAce" /> object to compare to the current <see cref="T:System.Security.AccessControl.GenericAce" /> object.</param>
// Token: 0x06002D74 RID: 11636 RVA: 0x00093B2C File Offset: 0x00091D2C
[MonoTODO]
public sealed override bool Equals(object o)
{
throw new NotImplementedException();
}
/// <summary>Marshals the contents of the <see cref="T:System.Security.AccessControl.GenericAce" /> object into the specified byte array beginning at the specified offset.</summary>
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl.GenericAce" /> is marshaled.</param>
/// <param name="offset">The offset at which to start marshaling.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl.GenericAcl" /> to be copied into <paramref name="array" />.</exception>
// Token: 0x06002D75 RID: 11637
[MonoTODO]
public abstract void GetBinaryForm(byte[] binaryForm, int offset);
/// <summary>Serves as a hash function for the <see cref="T:System.Security.AccessControl.GenericAce" /> class. The <see cref="M:System.Security.AccessControl.GenericAce.GetHashCode" /> method is suitable for use in hashing algorithms and data structures like a hash table.</summary>
/// <returns>A hash code for the current <see cref="T:System.Security.AccessControl.GenericAce" /> object.</returns>
// Token: 0x06002D76 RID: 11638 RVA: 0x00093B34 File Offset: 0x00091D34
[MonoTODO]
public sealed override int GetHashCode()
{
throw new NotImplementedException();
}
/// <summary>Determines whether the specified <see cref="T:System.Security.AccessControl.GenericAce" /> objects are considered equal.</summary>
/// <returns>true if the two <see cref="T:System.Security.AccessControl.GenericAce" /> objects are equal; otherwise, false.</returns>
/// <param name="left">The first <see cref="T:System.Security.AccessControl.GenericAce" /> object to compare.</param>
/// <param name="right">The second <see cref="T:System.Security.AccessControl.GenericAce" /> to compare.</param>
// Token: 0x06002D77 RID: 11639 RVA: 0x00093B3C File Offset: 0x00091D3C
[MonoTODO]
public static bool operator ==(GenericAce left, GenericAce right)
{
throw new NotImplementedException();
}
/// <summary>Determines whether the specified <see cref="T:System.Security.AccessControl.GenericAce" /> objects are considered unequal.</summary>
/// <returns>true if the two <see cref="T:System.Security.AccessControl.GenericAce" /> objects are unequal; otherwise, false.</returns>
/// <param name="left">The first <see cref="T:System.Security.AccessControl.GenericAce" /> object to compare.</param>
/// <param name="right">The second <see cref="T:System.Security.AccessControl.GenericAce" /> to compare.</param>
// Token: 0x06002D78 RID: 11640 RVA: 0x00093B44 File Offset: 0x00091D44
[MonoTODO]
public static bool operator !=(GenericAce left, GenericAce right)
{
throw new NotImplementedException();
}
// Token: 0x040011F8 RID: 4600
private InheritanceFlags inheritance;
// Token: 0x040011F9 RID: 4601
private PropagationFlags propagation;
// Token: 0x040011FA RID: 4602
private AceFlags aceflags;
// Token: 0x040011FB RID: 4603
private AceType ace_type;
}
}
@@ -0,0 +1,123 @@
using System;
using System.Collections;
namespace System.Security.AccessControl
{
/// <summary>Represents an access control list (ACL) and is the base class for the <see cref="T:System.Security.AccessControl.CommonAcl" />, <see cref="T:System.Security.AccessControl.DiscretionaryAcl" />, <see cref="T:System.Security.AccessControl.RawAcl" />, and <see cref="T:System.Security.AccessControl.SystemAcl" /> classes.</summary>
// Token: 0x020004C7 RID: 1223
public abstract class GenericAcl : IEnumerable, ICollection
{
/// <summary>Copies each <see cref="T:System.Security.AccessControl.GenericAce" /> of the current <see cref="T:System.Security.AccessControl.GenericAcl" /> into the specified array.</summary>
/// <param name="array">The array into which copies of the <see cref="T:System.Security.AccessControl.GenericAce" /> objects contained by the current <see cref="T:System.Security.AccessControl.GenericAcl" /> are placed.</param>
/// <param name="index">The zero-based index of <paramref name="array" /> where the copying begins.</param>
// Token: 0x06002D7B RID: 11643 RVA: 0x00093B6C File Offset: 0x00091D6C
void ICollection.CopyTo(Array array, int index)
{
this.CopyTo((GenericAce[])array, index);
}
/// <summary>Returns a new instance of the <see cref="T:System.Security.AccessControl.AceEnumerator" /> class cast as an instance of the <see cref="T:System.Collections.IEnumerator" /> interface.</summary>
/// <returns>A new <see cref="T:System.Security.AccessControl.AceEnumerator" /> object, cast as an instance of the <see cref="T:System.Collections.IEnumerator" /> interface.</returns>
// Token: 0x06002D7C RID: 11644 RVA: 0x00093B7C File Offset: 0x00091D7C
IEnumerator IEnumerable.GetEnumerator()
{
return this.GetEnumerator();
}
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.GenericAcl" /> object. This length should be used before marshaling the ACL into a binary array with the <see cref="M:System.Security.AccessControl.GenericAcl.GetBinaryForm" /> method.</summary>
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.GenericAcl" /> object.</returns>
// Token: 0x170008EB RID: 2283
// (get) Token: 0x06002D7D RID: 11645
public abstract int BinaryLength { get; }
/// <summary>Gets the number of access control entries (ACEs) in the current <see cref="T:System.Security.AccessControl.GenericAcl" /> object.</summary>
/// <returns>The number of ACEs in the current <see cref="T:System.Security.AccessControl.GenericAcl" /> object.</returns>
// Token: 0x170008EC RID: 2284
// (get) Token: 0x06002D7E RID: 11646
public abstract int Count { get; }
/// <summary>This property is always set to false. It is implemented only because it is required for the implementation of the <see cref="T:System.Collections.ICollection" /> interface.</summary>
/// <returns>Always false.</returns>
// Token: 0x170008ED RID: 2285
// (get) Token: 0x06002D7F RID: 11647 RVA: 0x00093B84 File Offset: 0x00091D84
public bool IsSynchronized
{
get
{
return false;
}
}
/// <summary>Gets or sets the <see cref="T:System.Security.AccessControl.GenericAce" /> at the specified index.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.GenericAce" /> at the specified index.</returns>
/// <param name="index">The zero-based index of the <see cref="T:System.Security.AccessControl.GenericAce" /> to get or set.</param>
// Token: 0x170008EE RID: 2286
public abstract GenericAce this[int index] { get; set; }
/// <summary>Gets the revision level of the <see cref="T:System.Security.AccessControl.GenericAcl" />.</summary>
/// <returns>A byte value that specifies the revision level of the <see cref="T:System.Security.AccessControl.GenericAcl" />.</returns>
// Token: 0x170008EF RID: 2287
// (get) Token: 0x06002D82 RID: 11650
public abstract byte Revision { get; }
/// <summary>This property always returns null. It is implemented only because it is required for the implementation of the <see cref="T:System.Collections.ICollection" /> interface.</summary>
/// <returns>Always returns null.</returns>
// Token: 0x170008F0 RID: 2288
// (get) Token: 0x06002D83 RID: 11651 RVA: 0x00093B88 File Offset: 0x00091D88
public object SyncRoot
{
get
{
return this;
}
}
/// <summary>Copies each <see cref="T:System.Security.AccessControl.GenericAce" /> of the current <see cref="T:System.Security.AccessControl.GenericAcl" /> into the specified array.</summary>
/// <param name="array">The array into which copies of the <see cref="T:System.Security.AccessControl.GenericAce" /> objects contained by the current <see cref="T:System.Security.AccessControl.GenericAcl" /> are placed.</param>
/// <param name="index">The zero-based index of <paramref name="array" /> where the copying begins.</param>
// Token: 0x06002D84 RID: 11652 RVA: 0x00093B8C File Offset: 0x00091D8C
public void CopyTo(GenericAce[] array, int index)
{
if (array == null)
{
throw new ArgumentNullException("array");
}
if (index < 0 || array.Length - index < this.Count)
{
throw new ArgumentOutOfRangeException("index", "Index must be non-negative integer and must not exceed array length - count");
}
for (int i = 0; i < this.Count; i++)
{
array[i + index] = this[i];
}
}
/// <summary>Marshals the contents of the <see cref="T:System.Security.AccessControl.GenericAcl" /> object into the specified byte array beginning at the specified offset.</summary>
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl.GenericAcl" /> is marshaled.</param>
/// <param name="offset">The offset at which to start marshaling.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl.GenericAcl" /> to be copied into <paramref name="array" />.</exception>
// Token: 0x06002D85 RID: 11653
public abstract void GetBinaryForm(byte[] binaryForm, int offset);
/// <summary>Returns a new instance of the <see cref="T:System.Security.AccessControl.AceEnumerator" /> class.</summary>
/// <returns>The <see cref="T:Security.AccessControl.AceEnumerator" /> that this method returns.</returns>
// Token: 0x06002D86 RID: 11654 RVA: 0x00093BF4 File Offset: 0x00091DF4
public AceEnumerator GetEnumerator()
{
return new AceEnumerator(this);
}
/// <summary>The revision level of the current <see cref="T:System.Security.AccessControl.GenericAcl" />. This value is returned by the <see cref="P:System.Security.AccessControl.GenericAcl.Revision" /> property for Access Control Lists (ACLs) that are not associated with Directory Services objects.</summary>
// Token: 0x040011FC RID: 4604
public static readonly byte AclRevision = 2;
/// <summary>The revision level of the current <see cref="T:System.Security.AccessControl.GenericAcl" />. This value is returned by the <see cref="P:System.Security.AccessControl.GenericAcl.Revision" /> property for Access Control Lists (ACLs) that are associated with Directory Services objects.</summary>
// Token: 0x040011FD RID: 4605
public static readonly byte AclRevisionDS = 4;
/// <summary>The maximum allowed binary length of a <see cref="T:System.Security.AccessControl.GenericAcl" /> object.</summary>
// Token: 0x040011FE RID: 4606
public static readonly int MaxBinaryLength = 65536;
}
}
@@ -0,0 +1,82 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a security descriptor. A security descriptor includes an owner, a primary group, a Discretionary Access Control List (DACL), and a System Access Control List (SACL).</summary>
// Token: 0x020004C8 RID: 1224
public abstract class GenericSecurityDescriptor
{
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object. This length should be used before marshaling the ACL into a binary array with the <see cref="M:System.Security.AccessControl.GenericSecurityDescriptor.GetBinaryForm" /> method.</summary>
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object.</returns>
// Token: 0x170008F1 RID: 2289
// (get) Token: 0x06002D88 RID: 11656 RVA: 0x00093C04 File Offset: 0x00091E04
public int BinaryLength
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets values that specify behavior of the <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object.</summary>
/// <returns>One or more values of the <see cref="T:System.Security.AccessControl.ControlFlags" /> enumeration combined with a logical OR operation.</returns>
// Token: 0x170008F2 RID: 2290
// (get) Token: 0x06002D89 RID: 11657
public abstract ControlFlags ControlFlags { get; }
/// <summary>Gets or sets the primary group for this <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object.</summary>
/// <returns>The primary group for this <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object.</returns>
// Token: 0x170008F3 RID: 2291
// (get) Token: 0x06002D8A RID: 11658
// (set) Token: 0x06002D8B RID: 11659
public abstract SecurityIdentifier Group { get; set; }
/// <summary>Gets or sets the owner of the object associated with this <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object.</summary>
/// <returns>The owner of the object associated with this <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object.</returns>
// Token: 0x170008F4 RID: 2292
// (get) Token: 0x06002D8C RID: 11660
// (set) Token: 0x06002D8D RID: 11661
public abstract SecurityIdentifier Owner { get; set; }
/// <summary>Gets the revision level of the <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object.</summary>
/// <returns>A byte value that specifies the revision level of the <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" />.</returns>
// Token: 0x170008F5 RID: 2293
// (get) Token: 0x06002D8E RID: 11662 RVA: 0x00093C0C File Offset: 0x00091E0C
public static byte Revision
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Returns an array of byte values that represents the information contained in this <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object.</summary>
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> is marshaled.</param>
/// <param name="offset">The offset at which to start marshaling.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> to be copied into <paramref name="array" />.</exception>
// Token: 0x06002D8F RID: 11663 RVA: 0x00093C14 File Offset: 0x00091E14
public void GetBinaryForm(byte[] binaryForm, int offset)
{
throw new NotImplementedException();
}
/// <summary>Returns the Security Descriptor Definition Language (SDDL) representation of the specified sections of the security descriptor that this <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object represents.</summary>
/// <returns>The SDDL representation of the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object.</returns>
/// <param name="includeSections">Specifies which sections (access rules, audit rules, primary group, owner) of the security descriptor to get.</param>
// Token: 0x06002D90 RID: 11664 RVA: 0x00093C1C File Offset: 0x00091E1C
public string GetSddlForm(AccessControlSections includeSections)
{
throw new NotImplementedException();
}
/// <summary>Returns a boolean value that specifies whether the security descriptor associated with this <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object can be converted to the Security Descriptor Definition Language (SDDL) format.</summary>
/// <returns>true if the security descriptor associated with this <see cref="T:System.Security.AccessControl.GenericSecurityDescriptor" /> object can be converted to the Security Descriptor Definition Language (SDDL) format; otherwise, false.</returns>
// Token: 0x06002D91 RID: 11665 RVA: 0x00093C24 File Offset: 0x00091E24
public static bool IsSddlConversionSupported()
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,20 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Inheritance flags specify the semantics of inheritance for access control entries (ACEs).</summary>
// Token: 0x020004C9 RID: 1225
[Flags]
public enum InheritanceFlags
{
/// <summary>The ACE is not inherited by child objects.</summary>
// Token: 0x04001200 RID: 4608
None = 0,
/// <summary>The ACE is inherited by child container objects.</summary>
// Token: 0x04001201 RID: 4609
ContainerInherit = 1,
/// <summary>The ACE is inherited by child leaf objects.</summary>
// Token: 0x04001202 RID: 4610
ObjectInherit = 2
}
}
@@ -0,0 +1,56 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Encapsulates all Access Control Entry (ACE) types currently defined by Microsoft Corporation. All <see cref="T:System.Security.AccessControl.KnownAce" /> objects contain a 32-bit access mask and a <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</summary>
// Token: 0x020004CA RID: 1226
public abstract class KnownAce : GenericAce
{
// Token: 0x06002D92 RID: 11666 RVA: 0x00093C2C File Offset: 0x00091E2C
internal KnownAce(InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
: base(inheritanceFlags, propagationFlags)
{
}
/// <summary>Gets or sets the access mask for this <see cref="T:System.Security.AccessControl.KnownAce" /> object.</summary>
/// <returns>The access mask for this <see cref="T:System.Security.AccessControl.KnownAce" /> object.</returns>
// Token: 0x170008F6 RID: 2294
// (get) Token: 0x06002D93 RID: 11667 RVA: 0x00093C38 File Offset: 0x00091E38
// (set) Token: 0x06002D94 RID: 11668 RVA: 0x00093C40 File Offset: 0x00091E40
public int AccessMask
{
get
{
return this.access_mask;
}
set
{
this.access_mask = value;
}
}
/// <summary>Gets or sets the <see cref="T:System.Security.Principal.SecurityIdentifier" /> object associated with this <see cref="T:System.Security.AccessControl.KnownAce" /> object.</summary>
/// <returns>The <see cref="T:System.Security.Principal.SecurityIdentifier" /> object associated with this <see cref="T:System.Security.AccessControl.KnownAce" /> object.</returns>
// Token: 0x170008F7 RID: 2295
// (get) Token: 0x06002D95 RID: 11669 RVA: 0x00093C4C File Offset: 0x00091E4C
// (set) Token: 0x06002D96 RID: 11670 RVA: 0x00093C54 File Offset: 0x00091E54
public SecurityIdentifier SecurityIdentifier
{
get
{
return this.identifier;
}
set
{
this.identifier = value;
}
}
// Token: 0x04001203 RID: 4611
private int access_mask;
// Token: 0x04001204 RID: 4612
private SecurityIdentifier identifier;
}
}
@@ -0,0 +1,58 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited.</summary>
// Token: 0x020004CB RID: 1227
public sealed class MutexAccessRule : AccessRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.MutexAccessRule" /> class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.</summary>
/// <param name="identity">The user or group the rule applies to. Must be of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> or a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="eventRights">A bitwise combination of <see cref="T:System.Security.AccessControl.MutexRights" /> values specifying the rights allowed or denied.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="eventRights" /> specifies an invalid value.-or-<paramref name="type" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identity" /> is null. -or-<paramref name="eventRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002D97 RID: 11671 RVA: 0x00093C60 File Offset: 0x00091E60
public MutexAccessRule(IdentityReference identity, MutexRights eventRights, AccessControlType type)
: base(identity, 0, false, InheritanceFlags.None, PropagationFlags.None, type)
{
this.rights = eventRights;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.MutexAccessRule" /> class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.</summary>
/// <param name="identity">The name of the user or group the rule applies to.</param>
/// <param name="eventRights">A bitwise combination of <see cref="T:System.Security.AccessControl.MutexRights" /> values specifying the rights allowed or denied.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="eventRights" /> specifies an invalid value.-or-<paramref name="type" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="eventRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is null.-or-<paramref name="identity" /> is a zero-length string.-or-<paramref name="identity" /> is longer than 512 characters.</exception>
// Token: 0x06002D98 RID: 11672 RVA: 0x00093C78 File Offset: 0x00091E78
public MutexAccessRule(string identity, MutexRights eventRights, AccessControlType type)
: this(new SecurityIdentifier(identity), eventRights, type)
{
}
/// <summary>Gets the rights allowed or denied by the access rule.</summary>
/// <returns>A bitwise combination of <see cref="T:System.Security.AccessControl.MutexRights" /> values indicating the rights allowed or denied by the access rule.</returns>
// Token: 0x170008F8 RID: 2296
// (get) Token: 0x06002D99 RID: 11673 RVA: 0x00093C88 File Offset: 0x00091E88
public MutexRights MutexRights
{
get
{
return this.rights;
}
}
// Token: 0x04001205 RID: 4613
private MutexRights rights;
}
}
@@ -0,0 +1,42 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a set of access rights to be audited for a user or group. This class cannot be inherited.</summary>
// Token: 0x020004CC RID: 1228
public sealed class MutexAuditRule : AuditRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.MutexAuditRule" /> class, specifying the user or group to audit, the rights to audit, and whether to audit success, failure, or both.</summary>
/// <param name="identity">The user or group the rule applies to. Must be of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> or a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="eventRights">A bitwise combination of <see cref="T:System.Security.AccessControl.MutexRights" /> values specifying the kinds of access to audit.</param>
/// <param name="flags">A bitwise combination of <see cref="T:System.Security.AccessControl.AuditFlags" /> values specifying whether to audit success, failure, or both.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="eventRights" /> specifies an invalid value.-or-<paramref name="flags" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identity" /> is null. -or-<paramref name="eventRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be translated to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002D9A RID: 11674 RVA: 0x00093C90 File Offset: 0x00091E90
public MutexAuditRule(IdentityReference identity, MutexRights eventRights, AuditFlags flags)
: base(identity, 0, false, InheritanceFlags.None, PropagationFlags.None, flags)
{
this.rights = eventRights;
}
/// <summary>Gets the access rights affected by the audit rule.</summary>
/// <returns>A bitwise combination of <see cref="T:System.Security.AccessControl.MutexRights" /> values that indicates the rights affected by the audit rule.</returns>
// Token: 0x170008F9 RID: 2297
// (get) Token: 0x06002D9B RID: 11675 RVA: 0x00093CA8 File Offset: 0x00091EA8
public MutexRights MutexRights
{
get
{
return this.rights;
}
}
// Token: 0x04001206 RID: 4614
private MutexRights rights;
}
}
@@ -0,0 +1,32 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the access control rights that can be applied to named system mutex objects.</summary>
// Token: 0x020004CD RID: 1229
[Flags]
public enum MutexRights
{
/// <summary>The right to release a named mutex.</summary>
// Token: 0x04001208 RID: 4616
Modify = 1,
/// <summary>The right to delete a named mutex.</summary>
// Token: 0x04001209 RID: 4617
Delete = 65536,
/// <summary>The right to open and copy the access rules and audit rules for a named mutex.</summary>
// Token: 0x0400120A RID: 4618
ReadPermissions = 131072,
/// <summary>The right to change the security and audit rules associated with a named mutex.</summary>
// Token: 0x0400120B RID: 4619
ChangePermissions = 262144,
/// <summary>The right to change the owner of a named mutex.</summary>
// Token: 0x0400120C RID: 4620
TakeOwnership = 524288,
/// <summary>The right to wait on a named mutex.</summary>
// Token: 0x0400120D RID: 4621
Synchronize = 1048576,
/// <summary>The right to exert full control over a named mutex, and to modify its access rules and audit rules.</summary>
// Token: 0x0400120E RID: 4622
FullControl = 2031617
}
}
@@ -0,0 +1,226 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents the Windows access control security for a named mutex. This class cannot be inherited. </summary>
// Token: 0x020004CE RID: 1230
public sealed class MutexSecurity : NativeObjectSecurity
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.MutexSecurity" /> class with default values.</summary>
/// <exception cref="T:System.NotSupportedException">This class is not supported on Windows 98 or Windows Millennium Edition.</exception>
// Token: 0x06002D9C RID: 11676 RVA: 0x00093CB0 File Offset: 0x00091EB0
public MutexSecurity()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.MutexSecurity" /> class with the specified sections of the access control security rules from the system mutex with the specified name.</summary>
/// <param name="name">The name of the system mutex whose access control security rules are to be retrieved.</param>
/// <param name="includeSections">A combination of <see cref="T:System.Security.AccessControl.AccessControlSections" /> flags specifying the sections to retrieve.</param>
/// <exception cref="T:System.IO.FileNotFoundException">There is no system object with the specified name.</exception>
/// <exception cref="T:System.NotSupportedException">This class is not supported on Windows 98 or Windows Millennium Edition.</exception>
// Token: 0x06002D9D RID: 11677 RVA: 0x00093CB8 File Offset: 0x00091EB8
public MutexSecurity(string name, AccessControlSections includeSections)
{
}
/// <summary>Gets the enumeration that the <see cref="T:System.Security.AccessControl.MutexSecurity" /> class uses to represent access rights.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.MutexRights" /> enumeration.</returns>
// Token: 0x170008FA RID: 2298
// (get) Token: 0x06002D9E RID: 11678 RVA: 0x00093CC0 File Offset: 0x00091EC0
public override Type AccessRightType
{
get
{
return typeof(MutexRights);
}
}
/// <summary>Gets the type that the <see cref="T:System.Security.AccessControl.MutexSecurity" /> class uses to represent access rules.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.MutexAccessRule" /> class.</returns>
// Token: 0x170008FB RID: 2299
// (get) Token: 0x06002D9F RID: 11679 RVA: 0x00093CCC File Offset: 0x00091ECC
public override Type AccessRuleType
{
get
{
return typeof(MutexAccessRule);
}
}
/// <summary>Gets the type that the <see cref="T:System.Security.AccessControl.MutexSecurity" /> class uses to represent audit rules.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.MutexAuditRule" /> class.</returns>
// Token: 0x170008FC RID: 2300
// (get) Token: 0x06002DA0 RID: 11680 RVA: 0x00093CD8 File Offset: 0x00091ED8
public override Type AuditRuleType
{
get
{
return typeof(MutexAuditRule);
}
}
/// <summary>Creates a new access control rule for the specified user, with the specified access rights, access control, and flags.</summary>
/// <returns>A <see cref="T:System.Security.AccessControl.MutexAccessRule" /> object representing the specified rights for the specified user.</returns>
/// <param name="identityReference">An <see cref="T:System.Security.Principal.IdentityReference" /> that identifies the user or group the rule applies to.</param>
/// <param name="accessMask">A bitwise combination of <see cref="T:System.Security.AccessControl.MutexRights" /> values specifying the access rights to allow or deny, cast to an integer.</param>
/// <param name="isInherited">Meaningless for named mutexes, because they have no hierarchy.</param>
/// <param name="inheritanceFlags">Meaningless for named mutexes, because they have no hierarchy.</param>
/// <param name="propagationFlags">Meaningless for named mutexes, because they have no hierarchy.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="accessMask" />, <paramref name="inheritanceFlags" />, <paramref name="propagationFlags" />, or <paramref name="type" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identityReference" /> is null. -or-<paramref name="accessMask" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identityReference" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" />, nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002DA1 RID: 11681 RVA: 0x00093CE4 File Offset: 0x00091EE4
public override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
{
return new MutexAccessRule(identityReference, (MutexRights)accessMask, type);
}
/// <summary>Searches for a matching access control rule with which the new rule can be merged. If none are found, adds the new rule.</summary>
/// <param name="rule">The access control rule to add.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
/// <exception cref="T:System.Security.Principal.IdentityNotMappedException">
/// <paramref name="rule " />cannot be mapped to a known identity.</exception>
// Token: 0x06002DA2 RID: 11682 RVA: 0x00093CF0 File Offset: 0x00091EF0
[MonoTODO]
public void AddAccessRule(MutexAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an access control rule with the same user and <see cref="T:System.Security.AccessControl.AccessControlType" /> (allow or deny) as the specified rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it.</summary>
/// <returns>true if a compatible rule is found; otherwise false.</returns>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.MutexAccessRule" /> that specifies the user and <see cref="T:System.Security.AccessControl.AccessControlType" /> to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002DA3 RID: 11683 RVA: 0x00093CF8 File Offset: 0x00091EF8
[MonoTODO]
public bool RemoveAccessRule(MutexAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for all access control rules with the same user and <see cref="T:System.Security.AccessControl.AccessControlType" /> (allow or deny) as the specified rule and, if found, removes them.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.MutexAccessRule" /> that specifies the user and <see cref="T:System.Security.AccessControl.AccessControlType" /> to search for. Any rights specified by this rule are ignored.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002DA4 RID: 11684 RVA: 0x00093D00 File Offset: 0x00091F00
[MonoTODO]
public void RemoveAccessRuleAll(MutexAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an access control rule that exactly matches the specified rule and, if found, removes it.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.MutexAccessRule" /> to remove.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002DA5 RID: 11685 RVA: 0x00093D08 File Offset: 0x00091F08
[MonoTODO]
public void RemoveAccessRuleSpecific(MutexAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access control rules with the same user as the specified rule, regardless of <see cref="T:System.Security.AccessControl.AccessControlType" />, and then adds the specified rule.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.MutexAccessRule" /> to add. The user specified by this rule determines the rules to remove before this rule is added.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002DA6 RID: 11686 RVA: 0x00093D10 File Offset: 0x00091F10
[MonoTODO]
public void ResetAccessRule(MutexAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access control rules with the same user and <see cref="T:System.Security.AccessControl.AccessControlType" /> (allow or deny) as the specified rule, and then adds the specified rule.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.MutexAccessRule" /> to add. The user and <see cref="T:System.Security.AccessControl.AccessControlType" /> of this rule determine the rules to remove before this rule is added.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002DA7 RID: 11687 RVA: 0x00093D18 File Offset: 0x00091F18
[MonoTODO]
public void SetAccessRule(MutexAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, and the outcome that triggers the audit rule.</summary>
/// <returns>A <see cref="T:System.Security.AccessControl.MutexAuditRule" /> object representing the specified audit rule for the specified user. The return type of the method is the base class, <see cref="T:System.Security.AccessControl.AuditRule" />, but the return value can be cast safely to the derived class.</returns>
/// <param name="identityReference">An <see cref="T:System.Security.Principal.IdentityReference" /> that identifies the user or group the rule applies to.</param>
/// <param name="accessMask">A bitwise combination of <see cref="T:System.Security.AccessControl.MutexRights" /> values specifying the access rights to audit, cast to an integer.</param>
/// <param name="isInherited">Meaningless for named wait handles, because they have no hierarchy.</param>
/// <param name="inheritanceFlags">Meaningless for named wait handles, because they have no hierarchy.</param>
/// <param name="propagationFlags">Meaningless for named wait handles, because they have no hierarchy.</param>
/// <param name="flags">A bitwise combination of <see cref="T:System.Security.AccessControl.AuditFlags" /> values that specify whether to audit successful access, failed access, or both.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="accessMask" />, <paramref name="inheritanceFlags" />, <paramref name="propagationFlags" />, or <paramref name="flags" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identityReference" /> is null. -or-<paramref name="accessMask" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identityReference" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" />, nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002DA8 RID: 11688 RVA: 0x00093D20 File Offset: 0x00091F20
public override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
{
return new MutexAuditRule(identityReference, (MutexRights)accessMask, flags);
}
/// <summary>Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule.</summary>
/// <param name="rule">The audit rule to add. The user specified by this rule determines the search.</param>
// Token: 0x06002DA9 RID: 11689 RVA: 0x00093D2C File Offset: 0x00091F2C
[MonoTODO]
public void AddAuditRule(MutexAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it.</summary>
/// <returns>true if a compatible rule is found; otherwise, false.</returns>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.MutexAuditRule" /> that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002DAA RID: 11690 RVA: 0x00093D34 File Offset: 0x00091F34
[MonoTODO]
public bool RemoveAuditRule(MutexAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for all audit rules with the same user as the specified rule and, if found, removes them.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.MutexAuditRule" /> that specifies the user to search for. Any rights specified by this rule are ignored.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002DAB RID: 11691 RVA: 0x00093D3C File Offset: 0x00091F3C
[MonoTODO]
public void RemoveAuditRuleAll(MutexAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an audit rule that exactly matches the specified rule and, if found, removes it.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.MutexAuditRule" /> to be removed.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002DAC RID: 11692 RVA: 0x00093D44 File Offset: 0x00091F44
[MonoTODO]
public void RemoveAuditRuleSpecific(MutexAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules with the same user as the specified rule, regardless of the <see cref="T:System.Security.AccessControl.AuditFlags" /> value, and then adds the specified rule.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.MutexAuditRule" /> to add. The user specified by this rule determines the rules to remove before this rule is added.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002DAD RID: 11693 RVA: 0x00093D4C File Offset: 0x00091F4C
[MonoTODO]
public void SetAuditRule(MutexAuditRule rule)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,136 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.AccessControl
{
/// <summary>Provides the ability to control access to native objects without direct manipulation of Access Control Lists (ACLs). Native object types are defined by the <see cref="T:System.Security.AccessControl.ResourceType" /> enumeration.</summary>
// Token: 0x020004CF RID: 1231
public abstract class NativeObjectSecurity : CommonObjectSecurity
{
// Token: 0x06002DAE RID: 11694 RVA: 0x00093D54 File Offset: 0x00091F54
internal NativeObjectSecurity()
: base(false)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> class with the specified values.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is a container object.</param>
/// <param name="resourceType">The type of securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
// Token: 0x06002DAF RID: 11695 RVA: 0x00093D60 File Offset: 0x00091F60
protected NativeObjectSecurity(bool isContainer, ResourceType resourceType)
: base(isContainer)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> class by using the specified values.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is a container object.</param>
/// <param name="resourceType">The type of securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="exceptionFromErrorCode">A delegate implemented by integrators that provides custom exceptions. </param>
/// <param name="exceptionContext">An object that contains contextual information about the source or destination of the exception.</param>
// Token: 0x06002DB0 RID: 11696 RVA: 0x00093D6C File Offset: 0x00091F6C
protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext)
: this(isContainer, resourceType)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> class with the specified values. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is a container object.</param>
/// <param name="resourceType">The type of securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="handle">The handle of the securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to include in this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object.</param>
// Token: 0x06002DB1 RID: 11697 RVA: 0x00093D78 File Offset: 0x00091F78
protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle handle, AccessControlSections includeSections)
: this(isContainer, resourceType)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> class with the specified values. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.NativObjectSecurity" /> object is a container object.</param>
/// <param name="resourceType">The type of securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="name">The name of the securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to include in this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object.</param>
// Token: 0x06002DB2 RID: 11698 RVA: 0x00093D84 File Offset: 0x00091F84
protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, string name, AccessControlSections includeSections)
: this(isContainer, resourceType)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> class with the specified values. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is a container object.</param>
/// <param name="resourceType">The type of securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="handle">The handle of the securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to include in this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object.</param>
/// <param name="exceptionFromErrorCode">A delegate implemented by integrators that provides custom exceptions. </param>
/// <param name="exceptionContext">An object that contains contextual information about the source or destination of the exception.</param>
// Token: 0x06002DB3 RID: 11699 RVA: 0x00093D90 File Offset: 0x00091F90
protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, SafeHandle handle, AccessControlSections includeSections, NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext)
: this(isContainer, resourceType, handle, includeSections)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> class with the specified values. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is a container object.</param>
/// <param name="resourceType">The type of securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="name">The name of the securable object with which the new <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to include in this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object.</param>
/// <param name="exceptionFromErrorCode">A delegate implemented by integrators that provides custom exceptions. </param>
/// <param name="exceptionContext">An object that contains contextual information about the source or destination of the exception.</param>
// Token: 0x06002DB4 RID: 11700 RVA: 0x00093DA0 File Offset: 0x00091FA0
protected NativeObjectSecurity(bool isContainer, ResourceType resourceType, string name, AccessControlSections includeSections, NativeObjectSecurity.ExceptionFromErrorCode exceptionFromErrorCode, object exceptionContext)
: this(isContainer, resourceType, name, includeSections)
{
}
/// <summary>Saves the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object to permanent storage. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="handle">The handle of the securable object with which this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>
/// <exception cref="T:System.IO.FileNotFoundException">The securable object with which this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated is either a directory or a file, and that directory or file could not be found.</exception>
// Token: 0x06002DB5 RID: 11701 RVA: 0x00093DB0 File Offset: 0x00091FB0
protected sealed override void Persist(SafeHandle handle, AccessControlSections includeSections)
{
throw new NotImplementedException();
}
/// <summary>Saves the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object to permanent storage. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="name">The name of the securable object with which this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>
/// <exception cref="T:System.IO.FileNotFoundException">The securable object with which this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated is either a directory or a file, and that directory or file could not be found.</exception>
// Token: 0x06002DB6 RID: 11702 RVA: 0x00093DB8 File Offset: 0x00091FB8
protected sealed override void Persist(string name, AccessControlSections includeSections)
{
throw new NotImplementedException();
}
/// <summary>Saves the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object to permanent storage. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="handle">The handle of the securable object with which this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>
/// <param name="exceptionContext">An object that contains contextual information about the source or destination of the exception.</param>
/// <exception cref="T:System.IO.FileNotFoundException">The securable object with which this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated is either a directory or a file, and that directory or file could not be found.</exception>
// Token: 0x06002DB7 RID: 11703 RVA: 0x00093DC0 File Offset: 0x00091FC0
protected void Persist(SafeHandle handle, AccessControlSections includeSections, object exceptionContext)
{
throw new NotImplementedException();
}
/// <summary>Saves the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object to permanent storage. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="name">The name of the securable object with which this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>
/// <param name="exceptionContext">An object that contains contextual information about the source or destination of the exception.</param>
/// <exception cref="T:System.IO.FileNotFoundException">The securable object with which this <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated is either a directory or a file, and that directory or file could not be found.</exception>
// Token: 0x06002DB8 RID: 11704 RVA: 0x00093DC8 File Offset: 0x00091FC8
protected void Persist(string name, AccessControlSections includeSections, object exceptionContext)
{
throw new NotImplementedException();
}
/// <summary>Provides a way for integrators to map numeric error codes to specific exceptions that they create.</summary>
/// <returns>The <see cref="T:System.Exception" /> this delegate creates.</returns>
/// <param name="errorCode">The numeric error code.</param>
/// <param name="name">The name of the securable object with which the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="handle">The handle of the securable object with which the <see cref="T:System.Security.AccessControl.NativeObjectSecurity" /> object is associated.</param>
/// <param name="context">An object that contains contextual information about the source or destination of the exception.</param>
// Token: 0x020006D1 RID: 1745
// (Invoke) Token: 0x060041CC RID: 16844
protected internal delegate Exception ExceptionFromErrorCode(int errorCode, string name, SafeHandle handle, object context);
}
}
@@ -0,0 +1,81 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a combination of a user's identity, an access mask, and an access control type (allow or deny). An <see cref="T:System.Security.AccessControl.ObjectAccessRule" /> object also contains information about the type of object to which the rule applies, the type of child object that can inherit the rule, how the rule is inherited by child objects, and how that inheritance is propagated.</summary>
// Token: 0x020004D0 RID: 1232
public abstract class ObjectAccessRule : AccessRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.ObjectAccessRule" /> class with the specified values.</summary>
/// <param name="identity">The identity to which the access rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">Specifies the inheritance properties of the access rule.</param>
/// <param name="propagationFlags">Specifies whether inherited access rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="objectType">The type of object to which the rule applies.</param>
/// <param name="inheritedObjectType">The type of child object that can inherit the rule.</param>
/// <param name="type">Specifies whether this rule allows or denies access.</param>
/// <exception cref="T:System.ArgumentException">The value of the <paramref name="identity" /> parameter cannot be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />, or the <paramref name="type" /> parameter contains an invalid value.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="accessMask" /> parameter is 0, or the <paramref name="inheritanceFlags" /> or <paramref name="propagationFlags" /> parameters contain unrecognized flag values.</exception>
// Token: 0x06002DB9 RID: 11705 RVA: 0x00093DD0 File Offset: 0x00091FD0
protected ObjectAccessRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid objectType, Guid inheritedObjectType, AccessControlType type)
: base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, type)
{
this.object_type = objectType;
this.inherited_object_type = inheritedObjectType;
}
/// <summary>Gets the type of child object that can inherit the <see cref="System.Security.AccessControl.ObjectAccessRule" /> object.</summary>
/// <returns>The type of child object that can inherit the <see cref="System.Security.AccessControl.ObjectAccessRule" /> object.</returns>
// Token: 0x170008FD RID: 2301
// (get) Token: 0x06002DBA RID: 11706 RVA: 0x00093DF4 File Offset: 0x00091FF4
public Guid InheritedObjectType
{
get
{
return this.inherited_object_type;
}
}
/// <summary>Gets flags that specify if the <see cref="P:System.Security.AccessControl.ObjectAccessRule.ObjectType" /> and <see cref="P:System.Security.AccessControl.ObjectAccessRule.InheritedObjectType" /> properties of the <see cref="System.Security.AccessControl.ObjectAccessRule" /> object contain valid values.</summary>
/// <returns>
/// <see cref="F:System.Security.AccessControl.ObjectAceFlags.ObjectAceTypePresent" /> specifies that the <see cref="P:System.Security.AccessControl.ObjectAccessRule.ObjectType" /> property contains a valid value. <see cref="F:System.Security.AccessControl.ObjectAceFlags.InheritedObjectAceTypePresent" /> specifies that the <see cref="P:System.Security.AccessControl.ObjectAccessRule.InheritedObjectType" /> property contains a valid value. These values can be combined with a logical OR.</returns>
// Token: 0x170008FE RID: 2302
// (get) Token: 0x06002DBB RID: 11707 RVA: 0x00093DFC File Offset: 0x00091FFC
public ObjectAceFlags ObjectFlags
{
get
{
ObjectAceFlags objectAceFlags = ObjectAceFlags.None;
if (this.object_type != Guid.Empty)
{
objectAceFlags |= ObjectAceFlags.ObjectAceTypePresent;
}
if (this.inherited_object_type != Guid.Empty)
{
objectAceFlags |= ObjectAceFlags.InheritedObjectAceTypePresent;
}
return objectAceFlags;
}
}
/// <summary>Gets the type of object to which the <see cref="System.Security.AccessControl.ObjectAccessRule" /> applies.</summary>
/// <returns>The type of object to which the <see cref="System.Security.AccessControl.ObjectAccessRule" /> applies.</returns>
// Token: 0x170008FF RID: 2303
// (get) Token: 0x06002DBC RID: 11708 RVA: 0x00093E40 File Offset: 0x00092040
public Guid ObjectType
{
get
{
return this.object_type;
}
}
// Token: 0x0400120F RID: 4623
private Guid object_type;
// Token: 0x04001210 RID: 4624
private Guid inherited_object_type;
}
}
@@ -0,0 +1,127 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Controls access to Directory Services objects. This class represents an Access Control Entry (ACE) associated with a directory object.</summary>
// Token: 0x020004D1 RID: 1233
public sealed class ObjectAce : QualifiedAce
{
/// <summary>Initiates a new instance of the <see cref="T:System.Security.AccessControl.ObjectAce" /> class.</summary>
/// <param name="aceFlags">The inheritance, inheritance propagation, and auditing conditions for the new Access Control Entry (ACE).</param>
/// <param name="qualifier">The use of the new ACE.</param>
/// <param name="accessMask">The access mask for the ACE.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> associated with the new ACE.</param>
/// <param name="flags">Whether the <paramref name="type" /> and <paramref name="inheritedType" /> parameters contain valid object GUIDs.</param>
/// <param name="type">A GUID that identifies the object type to which the new ACE applies.</param>
/// <param name="inheritedType">A GUID that identifies the object type that can inherit the new ACE.</param>
/// <param name="isCallback">true if the new ACE is a callback type ACE.</param>
/// <param name="opaque">Opaque data associated with the new ACE. This is allowed only for callback ACE types. The length of this array must not be greater than the return value of the <see cref="M:System.Security.AccessControl.ObjectAceMaxOpaqueLength" /> method.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The qualifier parameter contains an invalid value or the length of the value of the opaque parameter is greater than the return value of the <see cref="M:System.Security.AccessControl.ObjectAceMaxOpaqueLength" /> method.</exception>
// Token: 0x06002DBD RID: 11709 RVA: 0x00093E48 File Offset: 0x00092048
public ObjectAce(AceFlags aceFlags, AceQualifier qualifier, int accessMask, SecurityIdentifier sid, ObjectAceFlags flags, Guid type, Guid inheritedType, bool isCallback, byte[] opaque)
: base(InheritanceFlags.None, PropagationFlags.None, qualifier, isCallback, opaque)
{
base.AceFlags = aceFlags;
base.SecurityIdentifier = sid;
this.object_ace_flags = flags;
this.object_ace_type = type;
this.inherited_object_type = inheritedType;
}
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.ObjectAce" /> object. This length should be used before marshaling the ACL into a binary array with the <see cref="M:System.Security.AccessControl.ObjectAce.GetBinaryForm" /> method.</summary>
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.ObjectAce" /> object.</returns>
// Token: 0x17000900 RID: 2304
// (get) Token: 0x06002DBE RID: 11710 RVA: 0x00093E8C File Offset: 0x0009208C
[MonoTODO]
public override int BinaryLength
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets the GUID of the object type that can inherit the Access Control Entry (ACE) that this <see cref="T:System.Security.AccessControl.ObjectAce" /> object represents.</summary>
/// <returns>The GUID of the object type that can inherit the Access Control Entry (ACE) that this <see cref="T:System.Security.AccessControl.ObjectAce" /> object represents.</returns>
// Token: 0x17000901 RID: 2305
// (get) Token: 0x06002DBF RID: 11711 RVA: 0x00093E94 File Offset: 0x00092094
// (set) Token: 0x06002DC0 RID: 11712 RVA: 0x00093E9C File Offset: 0x0009209C
public Guid InheritedObjectAceType
{
get
{
return this.inherited_object_type;
}
set
{
this.inherited_object_type = value;
}
}
/// <summary>Gets or sets flags that specify whether the <see cref="P:System.Security.AccessControl.ObjectAce.ObjectAceType" /> and <see cref="P:System.Security.AccessControl.ObjectAce.InheritedObjectAceType" /> properties contain values that identify valid object types.</summary>
/// <returns>On or more members of the <see cref="T:System.Security.AccessControl.ObjectAceFlags" /> enumeration combined with a logical OR operation.</returns>
// Token: 0x17000902 RID: 2306
// (get) Token: 0x06002DC1 RID: 11713 RVA: 0x00093EA8 File Offset: 0x000920A8
// (set) Token: 0x06002DC2 RID: 11714 RVA: 0x00093EB0 File Offset: 0x000920B0
public ObjectAceFlags ObjectAceFlags
{
get
{
return this.object_ace_flags;
}
set
{
this.object_ace_flags = value;
}
}
/// <summary>Gets or sets the GUID of the object type associated with this <see cref="T:System.Security.AccessControl.ObjectAce" /> object.</summary>
/// <returns>The GUID of the object type associated with this <see cref="T:System.Security.AccessControl.ObjectAce" /> object.</returns>
// Token: 0x17000903 RID: 2307
// (get) Token: 0x06002DC3 RID: 11715 RVA: 0x00093EBC File Offset: 0x000920BC
// (set) Token: 0x06002DC4 RID: 11716 RVA: 0x00093EC4 File Offset: 0x000920C4
public Guid ObjectAceType
{
get
{
return this.object_ace_type;
}
set
{
this.object_ace_type = value;
}
}
/// <summary>Marshals the contents of the <see cref="T:System.Security.AccessControl.ObjectAce" /> object into the specified byte array beginning at the specified offset.</summary>
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl. ObjectAce" /> is marshaled.</param>
/// <param name="offset">The offset at which to start marshaling.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl.ObjectAce" /> to be copied into <paramref name="array" />.</exception>
// Token: 0x06002DC5 RID: 11717 RVA: 0x00093ED0 File Offset: 0x000920D0
[MonoTODO]
public override void GetBinaryForm(byte[] binaryForm, int offset)
{
throw new NotImplementedException();
}
/// <summary>Returns the maximum allowed length, in bytes, of an opaque data BLOB for callback Access Control Entries (ACEs).</summary>
/// <returns>The maximum allowed length, in bytes, of an opaque data BLOB for callback Access Control Entries (ACEs).</returns>
/// <param name="isCallback">True if the <see cref="T:System.Security.AccessControl.ObjectAce" /> is a callback ACE type.</param>
// Token: 0x06002DC6 RID: 11718 RVA: 0x00093ED8 File Offset: 0x000920D8
[MonoTODO]
public static int MaxOpaqueLength(bool isCallback)
{
throw new NotImplementedException();
}
// Token: 0x04001211 RID: 4625
private Guid object_ace_type;
// Token: 0x04001212 RID: 4626
private Guid inherited_object_type;
// Token: 0x04001213 RID: 4627
private ObjectAceFlags object_ace_flags;
}
}
@@ -0,0 +1,20 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the presence of object types for Access Control Entries (ACEs).</summary>
// Token: 0x020004D2 RID: 1234
[Flags]
public enum ObjectAceFlags
{
/// <summary>No object types are present.</summary>
// Token: 0x04001215 RID: 4629
None = 0,
/// <summary>The type of object that is associated with the ACE is present.</summary>
// Token: 0x04001216 RID: 4630
ObjectAceTypePresent = 1,
/// <summary>The type of object that can inherit the ACE.</summary>
// Token: 0x04001217 RID: 4631
InheritedObjectAceTypePresent = 2
}
}
@@ -0,0 +1,82 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a combination of a user's identity, an access mask, and audit conditions. An <see cref="T:System.Security.AccessControl.ObjectAuditRule" /> object also contains information about the type of object to which the rule applies, the type of child object that can inherit the rule, how the rule is inherited by child objects, and how that inheritance is propagated.</summary>
// Token: 0x020004D3 RID: 1235
public abstract class ObjectAuditRule : AuditRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.ObjectAuditRule" /> class.</summary>
/// <param name="identity">The identity to which the access rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">Specifies the inheritance properties of the access rule.</param>
/// <param name="propagationFlags">Whether inherited access rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="objectType">The type of object to which the rule applies.</param>
/// <param name="inheritedObjectType">The type of child object that can inherit the rule.</param>
/// <param name="auditFlags">The audit conditions.</param>
/// <exception cref="T:System.ArgumentException">The value of the <paramref name="identity" /> parameter cannot be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />, or the <paramref name="type" /> parameter contains an invalid value.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="accessMask" /> parameter is 0, or the <paramref name="inheritanceFlags" /> or <paramref name="propagationFlags" /> parameters contain unrecognized flag values.</exception>
// Token: 0x06002DC7 RID: 11719 RVA: 0x00093EE0 File Offset: 0x000920E0
protected ObjectAuditRule(IdentityReference identity, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid objectType, Guid inheritedObjectType, AuditFlags auditFlags)
: base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, auditFlags)
{
this.object_type = objectType;
this.inherited_object_type = inheritedObjectType;
}
/// <summary>Gets the type of child object that can inherit the <see cref="System.Security.AccessControl.ObjectAuditRule" /> object.</summary>
/// <returns>The type of child object that can inherit the <see cref="System.Security.AccessControl.ObjectAuditRule" /> object.</returns>
// Token: 0x17000904 RID: 2308
// (get) Token: 0x06002DC8 RID: 11720 RVA: 0x00093F04 File Offset: 0x00092104
public Guid InheritedObjectType
{
get
{
return this.inherited_object_type;
}
}
/// <summary>
/// <see cref="P:System.Security.AccessControl.ObjectAuditRule.ObjectType" /> and <see cref="P:System.Security.AccessControl.ObjectAuditRule.InheritedObjectType" /> properties of the <see cref="System.Security.AccessControl.ObjectAuditRule" /> object contain valid values.</summary>
/// <returns>
/// <see cref="F:System.Security.AccessControl.ObjectAceFlags.ObjectAceTypePresent" /> specifies that the <see cref="P:System.Security.AccessControl.ObjectAuditRule.ObjectType" /> property contains a valid value. <see cref="F:System.Security.AccessControl.ObjectAceFlags.InheritedObjectAceTypePresent" /> specifies that the <see cref="P:System.Security.AccessControl.ObjectAuditRule.InheritedObjectType" /> property contains a valid value. These values can be combined with a logical OR.</returns>
// Token: 0x17000905 RID: 2309
// (get) Token: 0x06002DC9 RID: 11721 RVA: 0x00093F0C File Offset: 0x0009210C
public ObjectAceFlags ObjectFlags
{
get
{
ObjectAceFlags objectAceFlags = ObjectAceFlags.None;
if (this.object_type != Guid.Empty)
{
objectAceFlags |= ObjectAceFlags.ObjectAceTypePresent;
}
if (this.inherited_object_type != Guid.Empty)
{
objectAceFlags |= ObjectAceFlags.InheritedObjectAceTypePresent;
}
return objectAceFlags;
}
}
/// <summary>Gets the type of object to which the <see cref="System.Security.AccessControl.ObjectAuditRule" /> applies.</summary>
/// <returns>The type of object to which the <see cref="System.Security.AccessControl.ObjectAuditRule" /> applies.</returns>
// Token: 0x17000906 RID: 2310
// (get) Token: 0x06002DCA RID: 11722 RVA: 0x00093F50 File Offset: 0x00092150
public Guid ObjectType
{
get
{
return this.object_type;
}
}
// Token: 0x04001218 RID: 4632
private Guid inherited_object_type;
// Token: 0x04001219 RID: 4633
private Guid object_type;
}
}
@@ -0,0 +1,483 @@
using System;
using System.Runtime.InteropServices;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Provides the ability to control access to objects without direct manipulation of Access Control Lists (ACLs). This class is the abstract base class for the <see cref="T:System.Security.AccessControl.CommonObjectSecurity" /> and <see cref="T:System.Security.AccessControl.DirectoryObjectSecurity" /> classes.</summary>
// Token: 0x020004D4 RID: 1236
public abstract class ObjectSecurity
{
// Token: 0x06002DCB RID: 11723 RVA: 0x00093F58 File Offset: 0x00092158
internal ObjectSecurity()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.ObjectSecurity" /> class.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object is a container object.</param>
/// <param name="isDS">True if the new <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object is a directory object.</param>
// Token: 0x06002DCC RID: 11724 RVA: 0x00093F60 File Offset: 0x00092160
protected ObjectSecurity(bool isContainer, bool isDS)
{
this.is_container = isContainer;
this.is_ds = isDS;
}
/// <summary>Gets the <see cref="T:System.Type" /> of the securable object associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</summary>
/// <returns>The type of the securable object associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</returns>
// Token: 0x17000907 RID: 2311
// (get) Token: 0x06002DCD RID: 11725
public abstract Type AccessRightType { get; }
/// <summary>Gets the <see cref="T:System.Type" /> of the object associated with the access rules of this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object. The <see cref="T:System.Type" /> object must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</summary>
/// <returns>The type of the object associated with the access rules of this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</returns>
// Token: 0x17000908 RID: 2312
// (get) Token: 0x06002DCE RID: 11726
public abstract Type AccessRuleType { get; }
/// <summary>Gets the <see cref="T:System.Type" /> object associated with the audit rules of this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object. The <see cref="T:System.Type" /> object must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</summary>
/// <returns>The type of the object associated with the audit rules of this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</returns>
// Token: 0x17000909 RID: 2313
// (get) Token: 0x06002DCF RID: 11727
public abstract Type AuditRuleType { get; }
/// <summary>Gets a Boolean value that specifies whether the access rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object are in canonical order.</summary>
/// <returns>true if the access rules are in canonical order; otherwise, false.</returns>
// Token: 0x1700090A RID: 2314
// (get) Token: 0x06002DD0 RID: 11728 RVA: 0x00093F78 File Offset: 0x00092178
[MonoTODO]
public bool AreAccessRulesCanonical
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets a Boolean value that specifies whether the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object is protected.</summary>
/// <returns>true if the DACL is protected; otherwise, false.</returns>
// Token: 0x1700090B RID: 2315
// (get) Token: 0x06002DD1 RID: 11729 RVA: 0x00093F80 File Offset: 0x00092180
[MonoTODO]
public bool AreAccessRulesProtected
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets a Boolean value that specifies whether the audit rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object are in canonical order.</summary>
/// <returns>true if the audit rules are in canonical order; otherwise, false.</returns>
// Token: 0x1700090C RID: 2316
// (get) Token: 0x06002DD2 RID: 11730 RVA: 0x00093F88 File Offset: 0x00092188
[MonoTODO]
public bool AreAuditRulesCanonical
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets a Boolean value that specifies whether the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object is protected.</summary>
/// <returns>true if the SACL is protected; otherwise, false.</returns>
// Token: 0x1700090D RID: 2317
// (get) Token: 0x06002DD3 RID: 11731 RVA: 0x00093F90 File Offset: 0x00092190
[MonoTODO]
public bool AreAuditRulesProtected
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets a Boolean value that specifies whether the access rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object have been modified.</summary>
/// <returns>true if the access rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object have been modified; otherwise, false.</returns>
// Token: 0x1700090E RID: 2318
// (get) Token: 0x06002DD4 RID: 11732 RVA: 0x00093F98 File Offset: 0x00092198
// (set) Token: 0x06002DD5 RID: 11733 RVA: 0x00093FA0 File Offset: 0x000921A0
protected bool AccessRulesModified
{
get
{
return this.access_rules_modified;
}
set
{
this.access_rules_modified = value;
}
}
/// <summary>Gets or sets a Boolean value that specifies whether the audit rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object have been modified.</summary>
/// <returns>true if the audit rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object have been modified; otherwise, false.</returns>
// Token: 0x1700090F RID: 2319
// (get) Token: 0x06002DD6 RID: 11734 RVA: 0x00093FAC File Offset: 0x000921AC
// (set) Token: 0x06002DD7 RID: 11735 RVA: 0x00093FB4 File Offset: 0x000921B4
protected bool AuditRulesModified
{
get
{
return this.audit_rules_modified;
}
set
{
this.audit_rules_modified = value;
}
}
/// <summary>Gets or sets a Boolean value that specifies whether the group associated with the securable object has been modified. </summary>
/// <returns>true if the group associated with the securable object has been modified; otherwise, false.</returns>
// Token: 0x17000910 RID: 2320
// (get) Token: 0x06002DD8 RID: 11736 RVA: 0x00093FC0 File Offset: 0x000921C0
// (set) Token: 0x06002DD9 RID: 11737 RVA: 0x00093FC8 File Offset: 0x000921C8
protected bool GroupModified
{
get
{
return this.group_modified;
}
set
{
this.group_modified = value;
}
}
/// <summary>Gets a Boolean value that specifies whether this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object is a container object.</summary>
/// <returns>true if the <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object is a container object; otherwise, false.</returns>
// Token: 0x17000911 RID: 2321
// (get) Token: 0x06002DDA RID: 11738 RVA: 0x00093FD4 File Offset: 0x000921D4
protected bool IsContainer
{
get
{
return this.is_container;
}
}
/// <summary>Gets a Boolean value that specifies whether this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object is a directory object.</summary>
/// <returns>true if the <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object is a directory object; otherwise, false.</returns>
// Token: 0x17000912 RID: 2322
// (get) Token: 0x06002DDB RID: 11739 RVA: 0x00093FDC File Offset: 0x000921DC
protected bool IsDS
{
get
{
return this.is_ds;
}
}
/// <summary>Gets or sets a Boolean value that specifies whether the owner of the securable object has been modified.</summary>
/// <returns>true if the owner of the securable object has been modified; otherwise, false.</returns>
// Token: 0x17000913 RID: 2323
// (get) Token: 0x06002DDC RID: 11740 RVA: 0x00093FE4 File Offset: 0x000921E4
// (set) Token: 0x06002DDD RID: 11741 RVA: 0x00093FEC File Offset: 0x000921EC
protected bool OwnerModified
{
get
{
return this.owner_modified;
}
set
{
this.owner_modified = value;
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.AccessRule" /> class with the specified values.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.AccessRule" /> object that this method creates.</returns>
/// <param name="identityReference">The identity to which the access rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">Specifies the inheritance properties of the access rule.</param>
/// <param name="propagationFlags">Specifies whether inherited access rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="type">Specifies the valid access control type.</param>
// Token: 0x06002DDE RID: 11742
public abstract AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type);
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.AuditRule" /> class with the specified values.</summary>
/// <returns>The <see cref="T:System.Security.AccessControl.AuditRule" /> object that this method creates.</returns>
/// <param name="identityReference">The identity to which the audit rule applies. It must be an object that can be cast as a <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="accessMask">The access mask of this rule. The access mask is a 32-bit collection of anonymous bits, the meaning of which is defined by the individual integrators.</param>
/// <param name="isInherited">true if this rule is inherited from a parent container.</param>
/// <param name="inheritanceFlags">Specifies the inheritance properties of the audit rule.</param>
/// <param name="propagationFlags">Specifies whether inherited audit rules are automatically propagated. The propagation flags are ignored if <paramref name="inheritanceFlags" /> is set to <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="flags">Specifies the conditions for which the rule is audited.</param>
// Token: 0x06002DDF RID: 11743
public abstract AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags);
/// <summary>Gets the primary group associated with the specified owner.</summary>
/// <returns>The primary group associated with the specified owner.</returns>
/// <param name="targetType">The owner for which to get the primary group. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// Token: 0x06002DE0 RID: 11744 RVA: 0x00093FF8 File Offset: 0x000921F8
[MonoTODO]
public IdentityReference GetGroup(Type targetType)
{
throw new NotImplementedException();
}
/// <summary>Gets the owner associated with the specified primary group.</summary>
/// <returns>The owner associated with the specified group.</returns>
/// <param name="targetType">The primary group for which to get the owner.</param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" />
/// </PermissionSet>
// Token: 0x06002DE1 RID: 11745 RVA: 0x00094000 File Offset: 0x00092200
[MonoTODO]
public IdentityReference GetOwner(Type targetType)
{
throw new NotImplementedException();
}
/// <summary>Returns an array of byte values that represents the security descriptor information for this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</summary>
/// <returns>An array of byte values that represents the security descriptor for this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object. This method returns null if there is no security information in this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</returns>
// Token: 0x06002DE2 RID: 11746 RVA: 0x00094008 File Offset: 0x00092208
[MonoTODO]
public byte[] GetSecurityDescriptorBinaryForm()
{
throw new NotImplementedException();
}
/// <summary>Returns the Security Descriptor Definition Language (SDDL) representation of the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</summary>
/// <returns>The SDDL representation of the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</returns>
/// <param name="includeSections">Specifies which sections (access rules, audit rules, primary group, owner) of the security descriptor to get.</param>
// Token: 0x06002DE3 RID: 11747 RVA: 0x00094010 File Offset: 0x00092210
[MonoTODO]
public string GetSecurityDescriptorSddlForm(AccessControlSections includeSections)
{
throw new NotImplementedException();
}
/// <summary>Returns a Boolean value that specifies whether the security descriptor associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object can be converted to the Security Descriptor Definition Language (SDDL) format.</summary>
/// <returns>true if the security descriptor associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object can be converted to the Security Descriptor Definition Language (SDDL) format; otherwise, false.</returns>
// Token: 0x06002DE4 RID: 11748 RVA: 0x00094018 File Offset: 0x00092218
[MonoTODO]
public static bool IsSddlConversionSupported()
{
throw new NotImplementedException();
}
/// <summary>Applies the specified modification to the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</summary>
/// <returns>true if the DACL is successfully modified; otherwise, false.</returns>
/// <param name="modification">The modification to apply to the DACL.</param>
/// <param name="rule">The access rule to modify.</param>
/// <param name="modified">true if the DACL is successfully modified; otherwise, false.</param>
// Token: 0x06002DE5 RID: 11749 RVA: 0x00094020 File Offset: 0x00092220
[MonoTODO]
public virtual bool ModifyAccessRule(AccessControlModification modification, AccessRule rule, out bool modified)
{
throw new NotImplementedException();
}
/// <summary>Applies the specified modification to the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</summary>
/// <returns>true if the SACL is successfully modified; otherwise, false.</returns>
/// <param name="modification">The modification to apply to the SACL.</param>
/// <param name="rule">The audit rule to modify.</param>
/// <param name="modified">true if the SACL is successfully modified; otherwise, false.</param>
// Token: 0x06002DE6 RID: 11750 RVA: 0x00094028 File Offset: 0x00092228
[MonoTODO]
public virtual bool ModifyAuditRule(AccessControlModification modification, AuditRule rule, out bool modified)
{
throw new NotImplementedException();
}
/// <summary>Removes all access rules associated with the specified <see cref="T:System.Security.Principal.IdentityReference" />.</summary>
/// <param name="identity">The <see cref="T:System.Security.Principal.IdentityReference" /> for which to remove all access rules.</param>
/// <exception cref="T:System.InvalidOperationException">All access rules are not in canonical order.</exception>
// Token: 0x06002DE7 RID: 11751 RVA: 0x00094030 File Offset: 0x00092230
[MonoTODO]
public virtual void PurgeAccessRules(IdentityReference identity)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules associated with the specified <see cref="T:System.Security.Principal.IdentityReference" />.</summary>
/// <param name="identity">The <see cref="T:System.Security.Principal.IdentityReference" /> for which to remove all audit rules.</param>
/// <exception cref="T:System.InvalidOperationException">All audit rules are not in canonical order.</exception>
// Token: 0x06002DE8 RID: 11752 RVA: 0x00094038 File Offset: 0x00092238
[MonoTODO]
public virtual void PurgeAuditRules(IdentityReference identity)
{
throw new NotImplementedException();
}
/// <summary>Sets or removes protection of the access rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object. Protected access rules cannot be modified by parent objects through inheritance.</summary>
/// <param name="isProtected">true to protect the access rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object from inheritance; false to allow inheritance.</param>
/// <param name="preserveInheritance">true to preserve inherited access rules; false to remove inherited access rules. This parameter is ignored if <paramref name="isProtected" /> is false.</param>
/// <exception cref="T:System.InvalidOperationException">This method attempts to remove inherited rules from a non-canonical Discretionary Access Control List (DACL).</exception>
// Token: 0x06002DE9 RID: 11753 RVA: 0x00094040 File Offset: 0x00092240
[MonoTODO]
public void SetAccessRuleProtection(bool isProtected, bool preserveInheritance)
{
throw new NotImplementedException();
}
/// <summary>Sets or removes protection of the audit rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object. Protected audit rules cannot be modified by parent objects through inheritance.</summary>
/// <param name="isProtected">true to protect the audit rules associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object from inheritance; false to allow inheritance.</param>
/// <param name="preserveInheritance">true to preserve inherited audit rules; false to remove inherited audit rules. This parameter is ignored if <paramref name="isProtected" /> is false.</param>
/// <exception cref="T:System.InvalidOperationException">This method attempts to remove inherited rules from a non-canonical System Access Control List (SACL).</exception>
// Token: 0x06002DEA RID: 11754 RVA: 0x00094048 File Offset: 0x00092248
[MonoTODO]
public void SetAuditRuleProtection(bool isProtected, bool preserveInheritance)
{
throw new NotImplementedException();
}
/// <summary>Sets the primary group for the security descriptor associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</summary>
/// <param name="identity">The primary group to set.</param>
// Token: 0x06002DEB RID: 11755 RVA: 0x00094050 File Offset: 0x00092250
[MonoTODO]
public void SetGroup(IdentityReference identity)
{
throw new NotImplementedException();
}
/// <summary>Sets the owner for the security descriptor associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</summary>
/// <param name="identity">The owner to set.</param>
// Token: 0x06002DEC RID: 11756 RVA: 0x00094058 File Offset: 0x00092258
[MonoTODO]
public void SetOwner(IdentityReference identity)
{
throw new NotImplementedException();
}
/// <summary>Sets the security descriptor for this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object from the specified array of byte values.</summary>
/// <param name="binaryForm">The array of bytes from which to set the security descriptor.</param>
// Token: 0x06002DED RID: 11757 RVA: 0x00094060 File Offset: 0x00092260
[MonoTODO]
public void SetSecurityDescriptorBinaryForm(byte[] binaryForm)
{
throw new NotImplementedException();
}
/// <summary>Sets the specified sections of the security descriptor for this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object from the specified array of byte values.</summary>
/// <param name="binaryForm">The array of bytes from which to set the security descriptor.</param>
/// <param name="includeSections">The sections (access rules, audit rules, owner, primary group) of the security descriptor to set.</param>
// Token: 0x06002DEE RID: 11758 RVA: 0x00094068 File Offset: 0x00092268
[MonoTODO]
public void SetSecurityDescriptorBinaryForm(byte[] binaryForm, AccessControlSections includeSections)
{
throw new NotImplementedException();
}
/// <summary>Sets the security descriptor for this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object from the specified Security Descriptor Definition Language (SDDL) string.</summary>
/// <param name="sddlForm">The SDDL string from which to set the security descriptor.</param>
// Token: 0x06002DEF RID: 11759 RVA: 0x00094070 File Offset: 0x00092270
[MonoTODO]
public void SetSecurityDescriptorSddlForm(string sddlForm)
{
throw new NotImplementedException();
}
/// <summary>Sets the specified sections of the security descriptor for this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object from the specified Security Descriptor Definition Language (SDDL) string.</summary>
/// <param name="sddlForm">The SDDL string from which to set the security descriptor.</param>
/// <param name="includeSections">The sections (access rules, audit rules, owner, primary group) of the security descriptor to set.</param>
// Token: 0x06002DF0 RID: 11760 RVA: 0x00094078 File Offset: 0x00092278
[MonoTODO]
public void SetSecurityDescriptorSddlForm(string sddlForm, AccessControlSections includeSections)
{
throw new NotImplementedException();
}
/// <summary>Applies the specified modification to the Discretionary Access Control List (DACL) associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</summary>
/// <returns>true if the DACL is successfully modified; otherwise, false.</returns>
/// <param name="modification">The modification to apply to the DACL.</param>
/// <param name="rule">The access rule to modify.</param>
/// <param name="modified">true if the DACL is successfully modified; otherwise, false.</param>
// Token: 0x06002DF1 RID: 11761
protected abstract bool ModifyAccess(AccessControlModification modification, AccessRule rule, out bool modified);
/// <summary>Applies the specified modification to the System Access Control List (SACL) associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object.</summary>
/// <returns>true if the SACL is successfully modified; otherwise, false.</returns>
/// <param name="modification">The modification to apply to the SACL.</param>
/// <param name="rule">The audit rule to modify.</param>
/// <param name="modified">true if the SACL is successfully modified; otherwise, false.</param>
// Token: 0x06002DF2 RID: 11762
protected abstract bool ModifyAudit(AccessControlModification modification, AuditRule rule, out bool modified);
/// <summary>Saves the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object to permanent storage. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="handle">The handle used to retrieve the persisted information.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>
// Token: 0x06002DF3 RID: 11763 RVA: 0x00094080 File Offset: 0x00092280
[MonoTODO]
protected virtual void Persist(SafeHandle handle, AccessControlSections includeSections)
{
throw new NotImplementedException();
}
/// <summary>Saves the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object to permanent storage. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="name">The name used to retrieve the persisted information.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>
// Token: 0x06002DF4 RID: 11764 RVA: 0x00094088 File Offset: 0x00092288
[MonoTODO]
protected virtual void Persist(string name, AccessControlSections includeSections)
{
throw new NotImplementedException();
}
/// <summary>Saves the specified sections of the security descriptor associated with this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object to permanent storage. We recommend that the values of the <paramref name="includeSections" /> parameters passed to the constructor and persist methods be identical. For more information, see Remarks.</summary>
/// <param name="enableOwnershipPrivilege">true to enable the privilege that allows the caller to take ownership of the object.</param>
/// <param name="name">The name used to retrieve the persisted information.</param>
/// <param name="includeSections">One of the <see cref="T:System.Security.AccessControl.AccessControlSections" /> enumeration values that specifies the sections of the security descriptor (access rules, audit rules, owner, primary group) of the securable object to save.</param>
// Token: 0x06002DF5 RID: 11765 RVA: 0x00094090 File Offset: 0x00092290
[MonoTODO]
protected virtual void Persist(bool enableOwnershipPrivilege, string name, AccessControlSections includeSections)
{
throw new NotImplementedException();
}
/// <summary>Locks this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object for read access.</summary>
// Token: 0x06002DF6 RID: 11766 RVA: 0x00094098 File Offset: 0x00092298
[MonoTODO]
protected void ReadLock()
{
throw new NotImplementedException();
}
/// <summary>Unlocks this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object for read access.</summary>
// Token: 0x06002DF7 RID: 11767 RVA: 0x000940A0 File Offset: 0x000922A0
[MonoTODO]
protected void ReadUnlock()
{
throw new NotImplementedException();
}
/// <summary>Locks this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object for write access.</summary>
// Token: 0x06002DF8 RID: 11768 RVA: 0x000940A8 File Offset: 0x000922A8
[MonoTODO]
protected void WriteLock()
{
throw new NotImplementedException();
}
/// <summary>Unlocks this <see cref="T:System.Security.AccessControl.ObjectSecurity" /> object for write access.</summary>
// Token: 0x06002DF9 RID: 11769 RVA: 0x000940B0 File Offset: 0x000922B0
[MonoTODO]
protected void WriteUnlock()
{
throw new NotImplementedException();
}
// Token: 0x0400121A RID: 4634
private bool is_container;
// Token: 0x0400121B RID: 4635
private bool is_ds;
// Token: 0x0400121C RID: 4636
private bool access_rules_modified;
// Token: 0x0400121D RID: 4637
private bool audit_rules_modified;
// Token: 0x0400121E RID: 4638
private bool group_modified;
// Token: 0x0400121F RID: 4639
private bool owner_modified;
}
}
@@ -0,0 +1,59 @@
using System;
using System.Runtime.Serialization;
namespace System.Security.AccessControl
{
/// <summary>The exception that is thrown when a method in the <see cref="N:System.Security.AccessControl" /> namespace attempts to enable a privilege that it does not have.</summary>
// Token: 0x020004D5 RID: 1237
[Serializable]
public sealed class PrivilegeNotHeldException : UnauthorizedAccessException, ISerializable
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.PrivilegeNotHeldException" /> class.</summary>
// Token: 0x06002DFA RID: 11770 RVA: 0x000940B8 File Offset: 0x000922B8
public PrivilegeNotHeldException()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.PrivilegeNotHeldException" /> class by using the specified privilege.</summary>
/// <param name="privilege">The privilege that is not enabled.</param>
// Token: 0x06002DFB RID: 11771 RVA: 0x000940C0 File Offset: 0x000922C0
public PrivilegeNotHeldException(string privilege)
: base(privilege)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.PrivilegeNotHeldException" /> class by using the specified exception.</summary>
/// <param name="privilege">The privilege that is not enabled.</param>
/// <param name="inner">The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.</param>
// Token: 0x06002DFC RID: 11772 RVA: 0x000940CC File Offset: 0x000922CC
public PrivilegeNotHeldException(string privilege, Exception inner)
: base(privilege, inner)
{
}
/// <summary>Gets the name of the privilege that is not enabled.</summary>
/// <returns>The name of the privilege that the method failed to enable.</returns>
// Token: 0x17000914 RID: 2324
// (get) Token: 0x06002DFD RID: 11773 RVA: 0x000940D8 File Offset: 0x000922D8
public string PrivilegeName
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Sets the <paramref name="info" /> parameter with information about the exception.</summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
/// </PermissionSet>
// Token: 0x06002DFE RID: 11774 RVA: 0x000940E0 File Offset: 0x000922E0
[MonoTODO]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,20 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies how Access Control Entries (ACEs) are propagated to child objects. These flags are significant only if inheritance flags are present. </summary>
// Token: 0x020004D6 RID: 1238
[Flags]
public enum PropagationFlags
{
/// <summary>Specifies that no inheritance flags are set.</summary>
// Token: 0x04001221 RID: 4641
None = 0,
/// <summary>Specifies that the ACE is not propagated to child objects.</summary>
// Token: 0x04001222 RID: 4642
NoPropagateInherit = 1,
/// <summary>Specifies that the ACE is propagated only to child objects. This includes both container and leaf child objects. </summary>
// Token: 0x04001223 RID: 4643
InheritOnly = 2
}
}
@@ -0,0 +1,83 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Represents an Access Control Entry (ACE) that contains a qualifier. The qualifier, represented by an <see cref="T:System.Security.AccessControl.AceQualifier" /> object, specifies whether the ACE allows access, denies access, causes system audits, or causes system alarms. The <see cref="T:System.Security.AccessControl.QualifiedAce" /> class is the abstract base class for the <see cref="T:System.Security.AccessControl.CommonAce" /> and <see cref="T:System.Security.AccessControl.ObjectAce" /> classes.</summary>
// Token: 0x020004D7 RID: 1239
public abstract class QualifiedAce : KnownAce
{
// Token: 0x06002DFF RID: 11775 RVA: 0x000940E8 File Offset: 0x000922E8
internal QualifiedAce(InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AceQualifier aceQualifier, bool isCallback, byte[] opaque)
: base(inheritanceFlags, propagationFlags)
{
this.ace_qualifier = aceQualifier;
this.is_callback = isCallback;
this.SetOpaque(opaque);
}
/// <summary>Gets a value that specifies whether the ACE allows access, denies access, causes system audits, or causes system alarms.</summary>
/// <returns>A value that specifies whether the ACE allows access, denies access, causes system audits, or causes system alarms.</returns>
// Token: 0x17000915 RID: 2325
// (get) Token: 0x06002E00 RID: 11776 RVA: 0x0009410C File Offset: 0x0009230C
public AceQualifier AceQualifier
{
get
{
return this.ace_qualifier;
}
}
/// <summary>Specifies whether this <see cref="T:System.Security.AccessControl.QualifiedAce" /> object contains callback data.</summary>
/// <returns>true if this <see cref="T:System.Security.AccessControl.QualifiedAce" /> object contains callback data; otherwise, false.</returns>
// Token: 0x17000916 RID: 2326
// (get) Token: 0x06002E01 RID: 11777 RVA: 0x00094114 File Offset: 0x00092314
public bool IsCallback
{
get
{
return this.is_callback;
}
}
/// <summary>Gets the length of the opaque callback data associated with this <see cref="T:System.Security.AccessControl.QualifiedAce" /> object. This property is valid only for callback Access Control Entries (ACEs).</summary>
/// <returns>The length of the opaque callback data.</returns>
// Token: 0x17000917 RID: 2327
// (get) Token: 0x06002E02 RID: 11778 RVA: 0x0009411C File Offset: 0x0009231C
public int OpaqueLength
{
get
{
return this.opaque.Length;
}
}
/// <summary>Returns the opaque callback data associated with this <see cref="T:System.Security.AccessControl.QualifiedAce" /> object. </summary>
/// <returns>An array of byte values that represents the opaque callback data associated with this <see cref="T:System.Security.AccessControl.QualifiedAce" /> object.</returns>
// Token: 0x06002E03 RID: 11779 RVA: 0x00094128 File Offset: 0x00092328
public byte[] GetOpaque()
{
return (byte[])this.opaque.Clone();
}
/// <summary>Sets the opaque callback data associated with this <see cref="T:System.Security.AccessControl.QualifiedAce" /> object.</summary>
/// <param name="opaque">An array of byte values that represents the opaque callback data for this <see cref="T:System.Security.AccessControl.QualifiedAce" /> object.</param>
// Token: 0x06002E04 RID: 11780 RVA: 0x0009413C File Offset: 0x0009233C
public void SetOpaque(byte[] opaque)
{
if (opaque == null)
{
throw new ArgumentNullException("opaque");
}
this.opaque = (byte[])opaque.Clone();
}
// Token: 0x04001224 RID: 4644
private AceQualifier ace_qualifier;
// Token: 0x04001225 RID: 4645
private bool is_callback;
// Token: 0x04001226 RID: 4646
private byte[] opaque;
}
}
@@ -0,0 +1,124 @@
using System;
using System.Collections.Generic;
namespace System.Security.AccessControl
{
/// <summary>Represents an Access Control List (ACL).</summary>
// Token: 0x020004D8 RID: 1240
public sealed class RawAcl : GenericAcl
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RawAcl" /> class with the specified revision level.</summary>
/// <param name="revision">The revision level of the new Access Control List (ACL).</param>
/// <param name="capacity">The number of Access Control Entries (ACEs) this <see cref="T:System.Security.AccessControl.RawAcl" /> object can contain. This number is to be used only as a hint.</param>
// Token: 0x06002E05 RID: 11781 RVA: 0x0009416C File Offset: 0x0009236C
public RawAcl(byte revision, int capacity)
{
this.revision = revision;
this.list = new List<GenericAce>(capacity);
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RawAcl" /> class from the specified binary form.</summary>
/// <param name="binaryForm">An array of byte values that represent an Access Control List (ACL).</param>
/// <param name="offset">The offset in the <paramref name="binaryForm" /> parameter at which to begin unmarshaling data.</param>
// Token: 0x06002E06 RID: 11782 RVA: 0x00094188 File Offset: 0x00092388
public RawAcl(byte[] binaryForm, int offset)
: this(0, 10)
{
}
/// <summary>Gets the length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.RawAcl" /> object. This length should be used before marshaling the ACL into a binary array with the <see cref="M:System.Security.AccessControl.RawAcl.GetBinaryForm" /> method.</summary>
/// <returns>The length, in bytes, of the binary representation of the current <see cref="T:System.Security.AccessControl.RawAcl" /> object.</returns>
// Token: 0x17000918 RID: 2328
// (get) Token: 0x06002E07 RID: 11783 RVA: 0x00094194 File Offset: 0x00092394
[MonoTODO]
public override int BinaryLength
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets the number of access control entries (ACEs) in the current <see cref="T:System.Security.AccessControl.RawAcl" /> object.</summary>
/// <returns>The number of ACEs in the current <see cref="T:System.Security.AccessControl.RawAcl" /> object.</returns>
// Token: 0x17000919 RID: 2329
// (get) Token: 0x06002E08 RID: 11784 RVA: 0x0009419C File Offset: 0x0009239C
public override int Count
{
get
{
return this.list.Count;
}
}
/// <summary>Gets or sets the Access Control Entry (ACE) at the specified index.</summary>
/// <returns>The ACE at the specified index.</returns>
/// <param name="index">The zero-based index of the ACE to get or set.</param>
// Token: 0x1700091A RID: 2330
public override GenericAce this[int index]
{
get
{
return this.list[index];
}
set
{
this.list[index] = value;
}
}
/// <summary>Gets the revision level of the <see cref="T:System.Security.AccessControl.RawAcl" />.</summary>
/// <returns>A byte value that specifies the revision level of the <see cref="T:System.Security.AccessControl.RawAcl" />.</returns>
// Token: 0x1700091B RID: 2331
// (get) Token: 0x06002E0B RID: 11787 RVA: 0x000941CC File Offset: 0x000923CC
public override byte Revision
{
get
{
return this.revision;
}
}
/// <summary>Marshals the contents of the <see cref="T:System.Security.AccessControl.RawAcl" /> object into the specified byte array beginning at the specified offset.</summary>
/// <param name="binaryForm">The byte array into which the contents of the <see cref="T:System.Security.AccessControl.RawAcl" /> is marshaled.</param>
/// <param name="offset">The offset at which to start marshaling.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl.RawAcl" /> to be copied into <paramref name="array" />.</exception>
// Token: 0x06002E0C RID: 11788 RVA: 0x000941D4 File Offset: 0x000923D4
[MonoTODO]
public override void GetBinaryForm(byte[] binaryForm, int offset)
{
throw new NotImplementedException();
}
/// <summary>Inserts the specified Access Control Entry (ACE) at the specified index.</summary>
/// <param name="index">The position at which to add the new ACE. Specify the value of the <see cref="P:System.Security.AccessControl.RawAcl.Count" /> property to insert an ACE at the end of the <see cref="T:System.Security.AccessControl.RawAcl" /> object.</param>
/// <param name="ace">The ACE to insert.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="offset" /> is negative or too high to allow the entire <see cref="T:System.Security.AccessControl.GenericAcl" /> to be copied into <paramref name="array" />.</exception>
// Token: 0x06002E0D RID: 11789 RVA: 0x000941DC File Offset: 0x000923DC
public void InsertAce(int index, GenericAce ace)
{
if (ace == null)
{
throw new ArgumentNullException("ace");
}
this.list.Insert(index, ace);
}
/// <summary>Removes the Access Control Entry (ACE) at the specified location.</summary>
/// <param name="index">The zero-based index of the ACE to remove.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The value of the <paramref name="index" /> parameter is higher than the value of the <see cref="P:System.Security.AccessControl.RawAcl.Count" /> property minus one or is negative.</exception>
// Token: 0x06002E0E RID: 11790 RVA: 0x00094210 File Offset: 0x00092410
public void RemoveAce(int index)
{
this.list.RemoveAt(index);
}
// Token: 0x04001227 RID: 4647
private byte revision;
// Token: 0x04001228 RID: 4648
private List<GenericAce> list;
}
}
@@ -0,0 +1,141 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a security descriptor. A security descriptor includes an owner, a primary group, a Discretionary Access Control List (DACL), and a System Access Control List (SACL).</summary>
// Token: 0x020004D9 RID: 1241
public sealed class RawSecurityDescriptor : GenericSecurityDescriptor
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> class from the specified Security Descriptor Definition Language (SDDL) string.</summary>
/// <param name="sddlForm">The SDDL string from which to create the new <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</param>
// Token: 0x06002E0F RID: 11791 RVA: 0x00094220 File Offset: 0x00092420
public RawSecurityDescriptor(string sddlForm)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> class from the specified array of byte values.</summary>
/// <param name="binaryForm">The array of byte values from which to create the new <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</param>
/// <param name="offset">The offset in the <paramref name="binaryForm" /> array at which to begin copying.</param>
// Token: 0x06002E10 RID: 11792 RVA: 0x00094228 File Offset: 0x00092428
public RawSecurityDescriptor(byte[] binaryForm, int offset)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> class with the specified values.</summary>
/// <param name="flags">Flags that specify behavior of the new <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</param>
/// <param name="owner">The owner for the new <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</param>
/// <param name="group">The primary group for the new <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</param>
/// <param name="systemAcl">The System Access Control List (SACL) for the new <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</param>
/// <param name="discretionaryAcl">The Discretionary Access Control List (DACL) for the new <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</param>
// Token: 0x06002E11 RID: 11793 RVA: 0x00094230 File Offset: 0x00092430
public RawSecurityDescriptor(ControlFlags flags, SecurityIdentifier owner, SecurityIdentifier group, RawAcl systemAcl, RawAcl discretionaryAcl)
{
}
/// <summary>Gets values that specify behavior of the <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</summary>
/// <returns>One or more values of the <see cref="T:System.Security.AccessControl.ControlFlags" /> enumeration combined with a logical OR operation.</returns>
// Token: 0x1700091C RID: 2332
// (get) Token: 0x06002E12 RID: 11794 RVA: 0x00094238 File Offset: 0x00092438
public override ControlFlags ControlFlags
{
get
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets the Discretionary Access Control List (DACL) for this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object. The DACL contains access rules.</summary>
/// <returns>The DACL for this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</returns>
// Token: 0x1700091D RID: 2333
// (get) Token: 0x06002E13 RID: 11795 RVA: 0x00094240 File Offset: 0x00092440
// (set) Token: 0x06002E14 RID: 11796 RVA: 0x00094248 File Offset: 0x00092448
public RawAcl DiscretionaryAcl
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets the primary group for this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</summary>
/// <returns>The primary group for this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</returns>
// Token: 0x1700091E RID: 2334
// (get) Token: 0x06002E15 RID: 11797 RVA: 0x00094250 File Offset: 0x00092450
// (set) Token: 0x06002E16 RID: 11798 RVA: 0x00094258 File Offset: 0x00092458
public override SecurityIdentifier Group
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets the owner of the object associated with this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</summary>
/// <returns>The owner of the object associated with this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</returns>
// Token: 0x1700091F RID: 2335
// (get) Token: 0x06002E17 RID: 11799 RVA: 0x00094260 File Offset: 0x00092460
// (set) Token: 0x06002E18 RID: 11800 RVA: 0x00094268 File Offset: 0x00092468
public override SecurityIdentifier Owner
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets a byte value that represents the resource manager control bits associated with this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</summary>
/// <returns>A byte value that represents the resource manager control bits associated with this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</returns>
// Token: 0x17000920 RID: 2336
// (get) Token: 0x06002E19 RID: 11801 RVA: 0x00094270 File Offset: 0x00092470
// (set) Token: 0x06002E1A RID: 11802 RVA: 0x00094278 File Offset: 0x00092478
public byte ResourceManagerControl
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets the System Access Control List (SACL) for this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object. The SACL contains audit rules.</summary>
/// <returns>The SACL for this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object.</returns>
// Token: 0x17000921 RID: 2337
// (get) Token: 0x06002E1B RID: 11803 RVA: 0x00094280 File Offset: 0x00092480
// (set) Token: 0x06002E1C RID: 11804 RVA: 0x00094288 File Offset: 0x00092488
public RawAcl SystemAcl
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
/// <summary>Sets the <see cref="P:System.Security.AccessControl.RawSecurityDescriptor.ControlFlags" /> property of this <see cref="T:System.Security.AccessControl.RawSecurityDescriptor" /> object to the specified value.</summary>
/// <param name="flags">One or more values of the <see cref="T:System.Security.AccessControl.ControlFlags" /> enumeration combined with a logical OR operation.</param>
// Token: 0x06002E1D RID: 11805 RVA: 0x00094290 File Offset: 0x00092490
public void SetFlags(ControlFlags flags)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,94 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited.</summary>
// Token: 0x020004DA RID: 1242
public sealed class RegistryAccessRule : AccessRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.</summary>
/// <param name="identity">The user or group the rule applies to. Must be of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> or a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="registryRights">A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values indicating the rights allowed or denied.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values indicating whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="registryRights" /> specifies an invalid value.-or-<paramref name="type" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identity" /> is null. -or-<paramref name="eventRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002E1E RID: 11806 RVA: 0x00094298 File Offset: 0x00092498
public RegistryAccessRule(IdentityReference identity, RegistryRights registryRights, AccessControlType type)
: this(identity, registryRights, InheritanceFlags.None, PropagationFlags.None, type)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied.</summary>
/// <param name="identity">The name of the user or group the rule applies to.</param>
/// <param name="registryRights">A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values indicating the rights allowed or denied.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values indicating whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="registryRights" /> specifies an invalid value.-or-<paramref name="type" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="registryRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is null.-or-<paramref name="identity" /> is a zero-length string.-or-<paramref name="identity" /> is longer than 512 characters.</exception>
// Token: 0x06002E1F RID: 11807 RVA: 0x000942A8 File Offset: 0x000924A8
public RegistryAccessRule(string identity, RegistryRights registryRights, AccessControlType type)
: this(new SecurityIdentifier(identity), registryRights, type)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> class, specifying the user or group the rule applies to, the access rights, the inheritance flags, the propagation flags, and whether the specified access rights are allowed or denied.</summary>
/// <param name="identity">The user or group the rule applies to. Must be of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> or a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="registryRights">A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values specifying the rights allowed or denied.</param>
/// <param name="inheritanceFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.InheritanceFlags" /> flags specifying how access rights are inherited from other objects.</param>
/// <param name="propagationFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.PropagationFlags" /> flags specifying how access rights are propagated to other objects.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="registryRights" /> specifies an invalid value.-or-<paramref name="type" /> specifies an invalid value.-or-<paramref name="inheritanceFlags" /> specifies an invalid value.-or-<paramref name="propagationFlags" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identity" /> is null.-or-<paramref name="registryRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" />, nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002E20 RID: 11808 RVA: 0x000942B8 File Offset: 0x000924B8
public RegistryAccessRule(IdentityReference identity, RegistryRights registryRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
: base(identity, 0, false, inheritanceFlags, propagationFlags, type)
{
this.rights = registryRights;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> class, specifying the name of the user or group the rule applies to, the access rights, the inheritance flags, the propagation flags, and whether the specified access rights are allowed or denied.</summary>
/// <param name="identity">The name of the user or group the rule applies to.</param>
/// <param name="registryRights">A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values indicating the rights allowed or denied.</param>
/// <param name="inheritanceFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.InheritanceFlags" /> flags specifying how access rights are inherited from other objects.</param>
/// <param name="propagationFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.PropagationFlags" /> flags specifying how access rights are propagated to other objects.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="registryRights" /> specifies an invalid value.-or-<paramref name="type" /> specifies an invalid value.-or-<paramref name="inheritanceFlags" /> specifies an invalid value.-or-<paramref name="propagationFlags" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="eventRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is null.-or-<paramref name="identity" /> is a zero-length string.-or-<paramref name="identity" /> is longer than 512 characters.</exception>
// Token: 0x06002E21 RID: 11809 RVA: 0x000942D0 File Offset: 0x000924D0
public RegistryAccessRule(string identity, RegistryRights registryRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
: this(new SecurityIdentifier(identity), registryRights, inheritanceFlags, propagationFlags, type)
{
}
/// <summary>Gets the rights allowed or denied by the access rule.</summary>
/// <returns>A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values indicating the rights allowed or denied by the access rule.</returns>
// Token: 0x17000922 RID: 2338
// (get) Token: 0x06002E22 RID: 11810 RVA: 0x000942E4 File Offset: 0x000924E4
public RegistryRights RegistryRights
{
get
{
return this.rights;
}
}
// Token: 0x04001229 RID: 4649
private RegistryRights rights;
}
}
@@ -0,0 +1,62 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a set of access rights to be audited for a user or group. This class cannot be inherited.</summary>
// Token: 0x020004DB RID: 1243
public sealed class RegistryAuditRule : AuditRule
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RegistryAuditRule" /> class, specifying the user or group to audit, the rights to audit, whether to take inheritance into account, and whether to audit success, failure, or both.</summary>
/// <param name="identity">The user or group the rule applies to. Must be of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> or a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</param>
/// <param name="registryRights">A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values specifying the kinds of access to audit.</param>
/// <param name="inheritanceFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.InheritanceFlags" /> values specifying whether the audit rule applies to subkeys of the current key.</param>
/// <param name="propagationFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.PropagationFlags" /> values that affect the way an inherited audit rule is propagated to subkeys of the current key.</param>
/// <param name="flags">A bitwise combination of <see cref="T:System.Security.AccessControl.AuditFlags" /> values specifying whether to audit success, failure, or both.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="eventRights" /> specifies an invalid value.-or-<paramref name="flags" /> specifies an invalid value.-or-<paramref name="inheritanceFlags" /> specifies an invalid value.-or-<paramref name="propagationFlags" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identity" /> is null. -or-<paramref name="registryRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" /> nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002E23 RID: 11811 RVA: 0x000942EC File Offset: 0x000924EC
public RegistryAuditRule(IdentityReference identity, RegistryRights registryRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
: base(identity, 0, false, inheritanceFlags, propagationFlags, flags)
{
this.rights = registryRights;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.RegistryAuditRule" /> class, specifying the name of the user or group to audit, the rights to audit, whether to take inheritance into account, and whether to audit success, failure, or both.</summary>
/// <param name="identity">The name of the user or group the rule applies to.</param>
/// <param name="registryRights">A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values specifying the kinds of access to audit.</param>
/// <param name="inheritanceFlags">A combination of <see cref="T:System.Security.AccessControl.InheritanceFlags" /> flags that specifies whether the audit rule applies to subkeys of the current key.</param>
/// <param name="propagationFlags">A combination of <see cref="T:System.Security.AccessControl.PropagationFlags" /> flags that affect the way an inherited audit rule is propagated to subkeys of the current key.</param>
/// <param name="flags">A bitwise combination of <see cref="T:System.Security.AccessControl.AuditFlags" /> values specifying whether to audit success, failure, or both.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="eventRights" /> specifies an invalid value.-or-<paramref name="flags" /> specifies an invalid value.-or-<paramref name="inheritanceFlags" /> specifies an invalid value.-or-<paramref name="propagationFlags" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="registryRights" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identity" /> is null.-or-<paramref name="identity" /> is a zero-length string.-or-<paramref name="identity" /> is longer than 512 characters.</exception>
// Token: 0x06002E24 RID: 11812 RVA: 0x00094304 File Offset: 0x00092504
public RegistryAuditRule(string identity, RegistryRights registryRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
: this(new SecurityIdentifier(identity), registryRights, inheritanceFlags, propagationFlags, flags)
{
}
/// <summary>Gets the access rights affected by the audit rule.</summary>
/// <returns>A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values that indicates the rights affected by the audit rule.</returns>
// Token: 0x17000923 RID: 2339
// (get) Token: 0x06002E25 RID: 11813 RVA: 0x00094318 File Offset: 0x00092518
public RegistryRights RegistryRights
{
get
{
return this.rights;
}
}
// Token: 0x0400122A RID: 4650
private RegistryRights rights;
}
}
@@ -0,0 +1,53 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the access control rights that can be applied to registry objects.</summary>
// Token: 0x020004DC RID: 1244
[Flags]
public enum RegistryRights
{
/// <summary>The right to query the name/value pairs in a registry key.</summary>
// Token: 0x0400122C RID: 4652
QueryValues = 1,
/// <summary>The right to create, delete, or set name/value pairs in a registry key.</summary>
// Token: 0x0400122D RID: 4653
SetValue = 2,
/// <summary>The right to create subkeys of a registry key.</summary>
// Token: 0x0400122E RID: 4654
CreateSubKey = 4,
/// <summary>The right to list the subkeys of a registry key.</summary>
// Token: 0x0400122F RID: 4655
EnumerateSubKeys = 8,
/// <summary>The right to request notification of changes on a registry key.</summary>
// Token: 0x04001230 RID: 4656
Notify = 16,
/// <summary>Reserved for system use.</summary>
// Token: 0x04001231 RID: 4657
CreateLink = 32,
/// <summary>The right to delete a registry key.</summary>
// Token: 0x04001232 RID: 4658
Delete = 65536,
/// <summary>The right to open and copy the access rules and audit rules for a registry key.</summary>
// Token: 0x04001233 RID: 4659
ReadPermissions = 131072,
/// <summary>The right to create, delete, and set the name/value pairs in a registry key, to create or delete subkeys, to request notification of changes, to enumerate its subkeys, and to read its access rules and audit rules.</summary>
// Token: 0x04001234 RID: 4660
WriteKey = 131078,
/// <summary>The right to query the name/value pairs in a registry key, to request notification of changes, to enumerate its subkeys, and to read its access rules and audit rules.</summary>
// Token: 0x04001235 RID: 4661
ReadKey = 131097,
/// <summary>Same as <see cref="F:System.Security.AccessControl.RegistryRights.ReadKey" />.</summary>
// Token: 0x04001236 RID: 4662
ExecuteKey = 131097,
/// <summary>The right to change the access rules and audit rules associated with a registry key.</summary>
// Token: 0x04001237 RID: 4663
ChangePermissions = 262144,
/// <summary>The right to change the owner of a registry key.</summary>
// Token: 0x04001238 RID: 4664
TakeOwnership = 524288,
/// <summary>The right to exert full control over a registry key, and to modify its access rules and audit rules.</summary>
// Token: 0x04001239 RID: 4665
FullControl = 983103
}
}
@@ -0,0 +1,194 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents the Windows access control security for a registry key. This class cannot be inherited.</summary>
// Token: 0x020004DD RID: 1245
public sealed class RegistrySecurity : NativeObjectSecurity
{
/// <summary>Gets the enumeration type that the <see cref="T:System.Security.AccessControl.RegistrySecurity" /> class uses to represent access rights.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.RegistryRights" /> enumeration.</returns>
// Token: 0x17000924 RID: 2340
// (get) Token: 0x06002E27 RID: 11815 RVA: 0x00094328 File Offset: 0x00092528
public override Type AccessRightType
{
get
{
return typeof(RegistryRights);
}
}
/// <summary>Gets the type that the <see cref="T:System.Security.AccessControl.RegistrySecurity" /> class uses to represent access rules.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> class.</returns>
// Token: 0x17000925 RID: 2341
// (get) Token: 0x06002E28 RID: 11816 RVA: 0x00094334 File Offset: 0x00092534
public override Type AccessRuleType
{
get
{
return typeof(RegistryAccessRule);
}
}
/// <summary>Gets the type that the <see cref="T:System.Security.AccessControl.RegistrySecurity" /> class uses to represent audit rules.</summary>
/// <returns>A <see cref="T:System.Type" /> object representing the <see cref="T:System.Security.AccessControl.RegistryAuditRule" /> class.</returns>
// Token: 0x17000926 RID: 2342
// (get) Token: 0x06002E29 RID: 11817 RVA: 0x00094340 File Offset: 0x00092540
public override Type AuditRuleType
{
get
{
return typeof(RegistryAuditRule);
}
}
/// <summary>Creates a new access control rule for the specified user, with the specified access rights, access control, and flags.</summary>
/// <returns>A <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> object representing the specified rights for the specified user.</returns>
/// <param name="identityReference">An <see cref="T:System.Security.Principal.IdentityReference" /> that identifies the user or group the rule applies to.</param>
/// <param name="accessMask">A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values specifying the access rights to allow or deny, cast to an integer.</param>
/// <param name="isInherited">A Boolean value specifying whether the rule is inherited.</param>
/// <param name="inheritanceFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.InheritanceFlags" /> values specifying how the rule is inherited by subkeys.</param>
/// <param name="propagationFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.PropagationFlags" /> values that modify the way the rule is inherited by subkeys. Meaningless if the value of <paramref name="inheritanceFlags" /> is <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="type">One of the <see cref="T:System.Security.AccessControl.AccessControlType" /> values specifying whether the rights are allowed or denied.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="accessMask" />, <paramref name="inheritanceFlags" />, <paramref name="propagationFlags" />, or <paramref name="type" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identityReference" /> is null. -or-<paramref name="accessMask" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identityReference" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" />, nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002E2A RID: 11818 RVA: 0x0009434C File Offset: 0x0009254C
public override AccessRule AccessRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
{
return new RegistryAccessRule(identityReference, (RegistryRights)accessMask, inheritanceFlags, propagationFlags, type);
}
/// <summary>Searches for a matching access control with which the new rule can be merged. If none are found, adds the new rule.</summary>
/// <param name="rule">The access control rule to add.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002E2B RID: 11819 RVA: 0x0009435C File Offset: 0x0009255C
public void AddAccessRule(RegistryAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule.</summary>
/// <param name="rule">The audit rule to add. The user specified by this rule determines the search.</param>
// Token: 0x06002E2C RID: 11820 RVA: 0x00094364 File Offset: 0x00092564
public void AddAuditRule(RegistryAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, the inheritance and propagation of the rule, and the outcome that triggers the rule.</summary>
/// <returns>A <see cref="T:System.Security.AccessControl.RegistryAuditRule" /> object representing the specified audit rule for the specified user, with the specified flags. The return type of the method is the base class, <see cref="T:System.Security.AccessControl.AuditRule" />, but the return value can be cast safely to the derived class.</returns>
/// <param name="identityReference">An <see cref="T:System.Security.Principal.IdentityReference" /> that identifies the user or group the rule applies to.</param>
/// <param name="accessMask">A bitwise combination of <see cref="T:System.Security.AccessControl.RegistryRights" /> values specifying the access rights to audit, cast to an integer.</param>
/// <param name="isInherited">A Boolean value specifying whether the rule is inherited.</param>
/// <param name="inheritanceFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.InheritanceFlags" /> values specifying how the rule is inherited by subkeys.</param>
/// <param name="propagationFlags">A bitwise combination of <see cref="T:System.Security.AccessControl.PropagationFlags" /> values that modify the way the rule is inherited by subkeys. Meaningless if the value of <paramref name="inheritanceFlags" /> is <see cref="F:System.Security.AccessControl.InheritanceFlags.None" />.</param>
/// <param name="flags">A bitwise combination of <see cref="T:System.Security.AccessControl.AuditFlags" /> values specifying whether to audit successful access, failed access, or both.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="accessMask" />, <paramref name="inheritanceFlags" />, <paramref name="propagationFlags" />, or <paramref name="flags" /> specifies an invalid value.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="identityReference" /> is null. -or-<paramref name="accessMask" /> is zero.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="identityReference" /> is neither of type <see cref="T:System.Security.Principal.SecurityIdentifier" />, nor of a type such as <see cref="T:System.Security.Principal.NTAccount" /> that can be converted to type <see cref="T:System.Security.Principal.SecurityIdentifier" />.</exception>
// Token: 0x06002E2D RID: 11821 RVA: 0x0009436C File Offset: 0x0009256C
public override AuditRule AuditRuleFactory(IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
{
return new RegistryAuditRule(identityReference, (RegistryRights)accessMask, inheritanceFlags, propagationFlags, flags);
}
/// <summary>Searches for an access control rule with the same user and <see cref="T:System.Security.AccessControl.AccessControlType" /> (allow or deny) as the specified access rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it.</summary>
/// <returns>true if a compatible rule is found; otherwise false.</returns>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> that specifies the user and <see cref="T:System.Security.AccessControl.AccessControlType" /> to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002E2E RID: 11822 RVA: 0x0009437C File Offset: 0x0009257C
public bool RemoveAccessRule(RegistryAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for all access control rules with the same user and <see cref="T:System.Security.AccessControl.AccessControlType" /> (allow or deny) as the specified rule and, if found, removes them.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> that specifies the user and <see cref="T:System.Security.AccessControl.AccessControlType" /> to search for. Any rights, inheritance flags, or propagation flags specified by this rule are ignored.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002E2F RID: 11823 RVA: 0x00094384 File Offset: 0x00092584
public void RemoveAccessRuleAll(RegistryAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an access control rule that exactly matches the specified rule and, if found, removes it.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> to remove.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002E30 RID: 11824 RVA: 0x0009438C File Offset: 0x0009258C
public void RemoveAccessRuleSpecific(RegistryAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it.</summary>
/// <returns>true if a compatible rule is found; otherwise, false.</returns>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.RegistryAuditRule" /> that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002E31 RID: 11825 RVA: 0x00094394 File Offset: 0x00092594
public bool RemoveAuditRule(RegistryAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for all audit rules with the same user as the specified rule and, if found, removes them.</summary>
/// <param name="rule">A <see cref="T:System.Security.AccessControl.RegistryAuditRule" /> that specifies the user to search for. Any rights, inheritance flags, or propagation flags specified by this rule are ignored.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002E32 RID: 11826 RVA: 0x0009439C File Offset: 0x0009259C
public void RemoveAuditRuleAll(RegistryAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Searches for an audit rule that exactly matches the specified rule and, if found, removes it.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.RegistryAuditRule" /> to be removed.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002E33 RID: 11827 RVA: 0x000943A4 File Offset: 0x000925A4
public void RemoveAuditRuleSpecific(RegistryAuditRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access control rules with the same user as the specified rule, regardless of <see cref="T:System.Security.AccessControl.AccessControlType" />, and then adds the specified rule.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> to add. The user specified by this rule determines the rules to remove before this rule is added.</param>
// Token: 0x06002E34 RID: 11828 RVA: 0x000943AC File Offset: 0x000925AC
public void ResetAccessRule(RegistryAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all access control rules with the same user and <see cref="T:System.Security.AccessControl.AccessControlType" /> (allow or deny) as the specified rule, and then adds the specified rule.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.RegistryAccessRule" /> to add. The user and <see cref="T:System.Security.AccessControl.AccessControlType" /> of this rule determine the rules to remove before this rule is added.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002E35 RID: 11829 RVA: 0x000943B4 File Offset: 0x000925B4
public void SetAccessRule(RegistryAccessRule rule)
{
throw new NotImplementedException();
}
/// <summary>Removes all audit rules with the same user as the specified rule, regardless of the <see cref="T:System.Security.AccessControl.AuditFlags" /> value, and then adds the specified rule.</summary>
/// <param name="rule">The <see cref="T:System.Security.AccessControl.RegistryAuditRule" /> to add. The user specified by this rule determines the rules to remove before this rule is added.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rule" /> is null.</exception>
// Token: 0x06002E36 RID: 11830 RVA: 0x000943BC File Offset: 0x000925BC
public void SetAuditRule(RegistryAuditRule rule)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,49 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the defined native object types.</summary>
// Token: 0x020004DE RID: 1246
public enum ResourceType
{
/// <summary>An unknown object type.</summary>
// Token: 0x0400123B RID: 4667
Unknown,
/// <summary>A file or directory.</summary>
// Token: 0x0400123C RID: 4668
FileObject,
/// <summary>A Windows service.</summary>
// Token: 0x0400123D RID: 4669
Service,
/// <summary>A printer.</summary>
// Token: 0x0400123E RID: 4670
Printer,
/// <summary>A registry key.</summary>
// Token: 0x0400123F RID: 4671
RegistryKey,
/// <summary>A network share.</summary>
// Token: 0x04001240 RID: 4672
LMShare,
/// <summary>A local kernel object.</summary>
// Token: 0x04001241 RID: 4673
KernelObject,
/// <summary>A window station or desktop object on the local computer.</summary>
// Token: 0x04001242 RID: 4674
WindowObject,
/// <summary>A directory service (DS) object or a property set or property of a directory service object.</summary>
// Token: 0x04001243 RID: 4675
DSObject,
/// <summary>A directory service object and all of its property sets and properties.</summary>
// Token: 0x04001244 RID: 4676
DSObjectAll,
/// <summary>An object defined by a provider.</summary>
// Token: 0x04001245 RID: 4677
ProviderDefined,
/// <summary>A Windows Management Instrumentation (WMI) object.</summary>
// Token: 0x04001246 RID: 4678
WmiGuidObject,
/// <summary>An object for a registry entry under WOW64.</summary>
// Token: 0x04001247 RID: 4679
RegistryWow6432Key
}
}
@@ -0,0 +1,23 @@
using System;
namespace System.Security.AccessControl
{
/// <summary>Specifies the section of a security descriptor to be queried or set.</summary>
// Token: 0x020004DF RID: 1247
[Flags]
public enum SecurityInfos
{
/// <summary>Specifies the owner identifier.</summary>
// Token: 0x04001249 RID: 4681
Owner = 1,
/// <summary>Specifies the primary group identifier.</summary>
// Token: 0x0400124A RID: 4682
Group = 2,
/// <summary>Specifies the discretionary access control list (DACL).</summary>
// Token: 0x0400124B RID: 4683
DiscretionaryAcl = 4,
/// <summary>Specifies the system access control list (SACL).</summary>
// Token: 0x0400124C RID: 4684
SystemAcl = 8
}
}
@@ -0,0 +1,151 @@
using System;
using System.Security.Principal;
namespace System.Security.AccessControl
{
/// <summary>Represents a System Access Control List (SACL).</summary>
// Token: 0x020004E0 RID: 1248
public sealed class SystemAcl : CommonAcl
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.SystemAcl" /> class with the specified values.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.SystemAcl" /> object is a container.</param>
/// <param name="isDS">true if the new <see cref="T:System.Security.AccessControl.SystemAcl" /> object is a directory object Access Control List (ACL).</param>
/// <param name="capacity">The number of Access Control Entries (ACEs) this <see cref="T:System.Security.AccessControl.SystemAcl" /> object can contain. This number is to be used only as a hint.</param>
// Token: 0x06002E37 RID: 11831 RVA: 0x000943C4 File Offset: 0x000925C4
public SystemAcl(bool isContainer, bool isDS, int capacity)
: this(isContainer, isDS, 0, capacity)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.SystemAcl" /> class with the specified values from the specified <see cref="T:System.Security.AccessControl.RawAcl" /> object.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.SystemAcl" /> object is a container.</param>
/// <param name="isDS">true if the new <see cref="T:System.Security.AccessControl.SystemAcl" /> object is a directory object Access Control List (ACL).</param>
/// <param name="rawAcl">The underlying <see cref="T:System.Security.AccessControl.RawAcl" /> object for the new <see cref="T:System.Security.AccessControl.SystemAcl" /> object. Specify null to create an empty ACL.</param>
// Token: 0x06002E38 RID: 11832 RVA: 0x000943D0 File Offset: 0x000925D0
public SystemAcl(bool isContainer, bool isDS, RawAcl rawAcl)
: this(isContainer, isDS, 0)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.AccessControl.SystemAcl" /> class with the specified values.</summary>
/// <param name="isContainer">true if the new <see cref="T:System.Security.AccessControl.SystemAcl" /> object is a container.</param>
/// <param name="isDS">true if the new <see cref="T:System.Security.AccessControl.SystemAcl" /> object is a directory object Access Control List (ACL).</param>
/// <param name="revision">The revision level of the new <see cref="T:System.Security.AccessControl.SystemAcl" /> object.</param>
/// <param name="capacity">The number of Access Control Entries (ACEs) this <see cref="T:System.Security.AccessControl.SystemAcl" /> object can contain. This number is to be used only as a hint.</param>
// Token: 0x06002E39 RID: 11833 RVA: 0x000943DC File Offset: 0x000925DC
public SystemAcl(bool isContainer, bool isDS, byte revision, int capacity)
: base(isContainer, isDS, revision, capacity)
{
}
/// <summary>Adds an audit rule to the current <see cref="T:System.Security.AccessControl.SystemAcl" /> object.</summary>
/// <param name="auditFlags">The type of audit rule to add.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to add an audit rule.</param>
/// <param name="accessMask">The access mask for the new audit rule.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the new audit rule.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the new audit rule.</param>
// Token: 0x06002E3A RID: 11834 RVA: 0x000943EC File Offset: 0x000925EC
public void AddAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
throw new NotImplementedException();
}
/// <summary>Adds an audit rule with the specified settings to the current <see cref="T:System.Security.AccessControl.SystemAcl" /> object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type for the new audit rule.</summary>
/// <param name="auditFlags">The type of audit rule to add.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to add an audit rule.</param>
/// <param name="accessMask">The access mask for the new audit rule.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the new audit rule.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the new audit rule.</param>
/// <param name="objectFlags">Flags that specify if the <paramref name="objectType" /> and <paramref name="inheritedObjectType" /> parameters contain non-null values.</param>
/// <param name="objectType">The identity of the class of objects to which the new audit rule applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the new audit rule.</param>
// Token: 0x06002E3B RID: 11835 RVA: 0x000943F4 File Offset: 0x000925F4
public void AddAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
/// <summary>Removes the specified audit rule from the current <see cref="T:System.Security.AccessControl.SystemAcl" /> object.</summary>
/// <returns>true if this method successfully removes the specified audit rule; otherwise, false.</returns>
/// <param name="auditFlags">The type of audit rule to remove.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an audit rule.</param>
/// <param name="accessMask">The access mask for the rule to be removed.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the rule to be removed.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the rule to be removed.</param>
// Token: 0x06002E3C RID: 11836 RVA: 0x000943FC File Offset: 0x000925FC
public bool RemoveAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
throw new NotImplementedException();
}
/// <summary>Removes the specified audit rule from the current <see cref="T:System.Security.AccessControl.SystemAcl" /> object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type.</summary>
/// <returns>true if this method successfully removes the specified audit rule; otherwise, false.</returns>
/// <param name="auditFlags">The type of audit rule to remove.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an audit rule.</param>
/// <param name="accessMask">The access mask for the rule to be removed.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the rule to be removed.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the rule to be removed.</param>
/// <param name="objectFlags">Flags that specify if the <paramref name="objectType" /> and <paramref name="inheritedObjectType" /> parameters contain non-null values.</param>
/// <param name="objectType">The identity of the class of objects to which the removed audit control rule applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the removed audit rule.</param>
// Token: 0x06002E3D RID: 11837 RVA: 0x00094404 File Offset: 0x00092604
public bool RemoveAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
/// <summary>Removes the specified audit rule from the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object.</summary>
/// <param name="auditFlags">The type of audit rule to remove.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an audit rule.</param>
/// <param name="accessMask">The access mask for the rule to be removed.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the rule to be removed.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the rule to be removed.</param>
// Token: 0x06002E3E RID: 11838 RVA: 0x0009440C File Offset: 0x0009260C
public void RemoveAuditSpecific(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
throw new NotImplementedException();
}
/// <summary>Removes the specified audit rule from the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type.</summary>
/// <param name="auditFlags">The type of audit rule to remove.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an audit rule.</param>
/// <param name="accessMask">The access mask for the rule to be removed.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the rule to be removed.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the rule to be removed.</param>
/// <param name="objectFlags">Flags that specify if the <paramref name="objectType" /> and <paramref name="inheritedObjectType" /> parameters contain non-null values.</param>
/// <param name="objectType">The identity of the class of objects to which the removed audit control rule applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the removed audit rule.</param>
// Token: 0x06002E3F RID: 11839 RVA: 0x00094414 File Offset: 0x00092614
public void RemoveAuditSpecific(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
/// <summary>Sets the specified audit rule for the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object.</summary>
/// <param name="auditFlags">The audit condition to set.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to set an audit rule.</param>
/// <param name="accessMask">The access mask for the new audit rule.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the new audit rule.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the new audit rule.</param>
// Token: 0x06002E40 RID: 11840 RVA: 0x0009441C File Offset: 0x0009261C
public void SetAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
{
throw new NotImplementedException();
}
/// <summary>Sets the specified audit rule for the specified <see cref="T:System.Security.Principal.SecurityIdentifier" /> object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type.</summary>
/// <param name="auditFlags">The audit condition to set.</param>
/// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to set an audit rule.</param>
/// <param name="accessMask">The access mask for the new audit rule.</param>
/// <param name="inheritanceFlags">Flags that specify the inheritance properties of the new audit rule.</param>
/// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the new audit rule.</param>
/// <param name="objectFlags">Flags that specify if the <paramref name="objectType" /> and <paramref name="inheritedObjectType" /> parameters contain non-null values.</param>
/// <param name="objectType">The identity of the class of objects to which the new audit rule applies.</param>
/// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the new audit rule.</param>
// Token: 0x06002E41 RID: 11841 RVA: 0x00094424 File Offset: 0x00092624
public void SetAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
{
throw new NotImplementedException();
}
}
}
@@ -0,0 +1,13 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security
{
/// <summary>Allows strong-named assemblies to be called by partially trusted code. Without this declaration, only fully trusted callers are able to use such assemblies. This class cannot be inherited.</summary>
// Token: 0x020005BB RID: 1467
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
[ComVisible(true)]
public sealed class AllowPartiallyTrustedCallersAttribute : Attribute
{
}
}
@@ -0,0 +1,335 @@
using System;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Security.Permissions;
namespace System.Security
{
/// <summary>Defines the underlying structure of all code access permissions.</summary>
// Token: 0x020005BC RID: 1468
[ComVisible(true)]
[MonoTODO("CAS support is experimental (and unsupported).")]
[Serializable]
public abstract class CodeAccessPermission : IPermission, ISecurityEncodable, IStackWalk
{
/// <summary>Declares that the calling code can access the resource protected by a permission demand through the code that calls this method, even if callers higher in the stack have not been granted permission to access the resource. Using <see cref="M:System.Security.CodeAccessPermission.Assert" /> can create security issues.</summary>
/// <exception cref="T:System.Security.SecurityException">The calling code does not have <see cref="F:System.Security.Permissions.SecurityPermissionFlag.Assertion" />.-or- There is already an active <see cref="M:System.Security.CodeAccessPermission.Assert" /> for the current frame. </exception>
// Token: 0x06003595 RID: 13717 RVA: 0x000B7D10 File Offset: 0x000B5F10
[MonoTODO("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
public void Assert()
{
}
// Token: 0x06003596 RID: 13718 RVA: 0x000B7D14 File Offset: 0x000B5F14
internal bool CheckAssert(CodeAccessPermission asserted)
{
return asserted != null && asserted.GetType() == base.GetType() && this.IsSubsetOf(asserted);
}
// Token: 0x06003597 RID: 13719 RVA: 0x000B7D44 File Offset: 0x000B5F44
internal bool CheckDemand(CodeAccessPermission target)
{
return target != null && target.GetType() == base.GetType() && this.IsSubsetOf(target);
}
// Token: 0x06003598 RID: 13720 RVA: 0x000B7D74 File Offset: 0x000B5F74
internal bool CheckDeny(CodeAccessPermission denied)
{
if (denied == null)
{
return true;
}
Type type = denied.GetType();
return type != base.GetType() || this.Intersect(denied) == null || denied.IsSubsetOf(PermissionBuilder.Create(type));
}
// Token: 0x06003599 RID: 13721 RVA: 0x000B7DBC File Offset: 0x000B5FBC
internal bool CheckPermitOnly(CodeAccessPermission target)
{
return target != null && target.GetType() == base.GetType() && this.IsSubsetOf(target);
}
/// <summary>When implemented by a derived class, creates and returns an identical copy of the current permission object.</summary>
/// <returns>A copy of the current permission object.</returns>
// Token: 0x0600359A RID: 13722
public abstract IPermission Copy();
/// <summary>Forces a <see cref="T:System.Security.SecurityException" /> at run time if all callers higher in the call stack have not been granted the permission specified by the current instance.</summary>
/// <exception cref="T:System.Security.SecurityException">A caller higher in the call stack does not have the permission specified by the current instance.-or- A caller higher in the call stack has called <see cref="M:System.Security.CodeAccessPermission.Deny" /> on the current permission object. </exception>
// Token: 0x0600359B RID: 13723 RVA: 0x000B7DEC File Offset: 0x000B5FEC
public void Demand()
{
}
/// <summary>Prevents callers higher in the call stack from using the code that calls this method to access the resource specified by the current instance.</summary>
/// <exception cref="T:System.Security.SecurityException">There is already an active <see cref="M:System.Security.CodeAccessPermission.Deny" /> for the current frame. </exception>
// Token: 0x0600359C RID: 13724 RVA: 0x000B7DF0 File Offset: 0x000B5FF0
[MonoTODO("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
public void Deny()
{
}
/// <summary>Determines whether the specified <see cref="T:System.Security.CodeAccessPermission" /> object is equal to the current <see cref="T:System.Security.CodeAccessPermission" />.</summary>
/// <returns>true if the specified <see cref="T:System.Security.CodeAccessPermission" /> object is equal to the current <see cref="T:System.Security.CodeAccessPermission" />; otherwise, false.</returns>
/// <param name="obj">The <see cref="T:System.Security.CodeAccessPermission" /> object to compare with the current <see cref="T:System.Security.CodeAccessPermission" />. </param>
// Token: 0x0600359D RID: 13725 RVA: 0x000B7DF4 File Offset: 0x000B5FF4
[ComVisible(false)]
public override bool Equals(object obj)
{
if (obj == null)
{
return false;
}
if (obj.GetType() != base.GetType())
{
return false;
}
CodeAccessPermission codeAccessPermission = obj as CodeAccessPermission;
return this.IsSubsetOf(codeAccessPermission) && codeAccessPermission.IsSubsetOf(this);
}
/// <summary>When overridden in a derived class, reconstructs a security object with a specified state from an XML encoding.</summary>
/// <param name="elem">The XML encoding to use to reconstruct the security object. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="elem" /> parameter is null. </exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="elem" /> parameter does not contain the XML encoding for an instance of the same type as the current instance.-or- The version number of the <paramref name="elem" /> parameter is not supported. </exception>
// Token: 0x0600359E RID: 13726
public abstract void FromXml(SecurityElement elem);
/// <summary>Gets a hash code for the <see cref="T:System.Security.CodeAccessPermission" /> object that is suitable for use in hashing algorithms and data structures such as a hash table.</summary>
/// <returns>A hash code for the current <see cref="T:System.Security.CodeAccessPermission" /> object.</returns>
// Token: 0x0600359F RID: 13727 RVA: 0x000B7E3C File Offset: 0x000B603C
[ComVisible(false)]
public override int GetHashCode()
{
return base.GetHashCode();
}
/// <summary>When implemented by a derived class, creates and returns a permission that is the intersection of the current permission and the specified permission.</summary>
/// <returns>A new permission that represents the intersection of the current permission and the specified permission. This new permission is null if the intersection is empty.</returns>
/// <param name="target">A permission to intersect with the current permission. It must be of the same type as the current permission. </param>
/// <exception cref="T:System.ArgumentException">The <paramref name="target" /> parameter is not null and is not an instance of the same class as the current permission. </exception>
// Token: 0x060035A0 RID: 13728
public abstract IPermission Intersect(IPermission target);
/// <summary>When implemented by a derived class, determines whether the current permission is a subset of the specified permission.</summary>
/// <returns>true if the current permission is a subset of the specified permission; otherwise, false.</returns>
/// <param name="target">A permission that is to be tested for the subset relationship. This permission must be of the same type as the current permission. </param>
/// <exception cref="T:System.ArgumentException">The <paramref name="target" /> parameter is not null and is not of the same type as the current permission. </exception>
// Token: 0x060035A1 RID: 13729
public abstract bool IsSubsetOf(IPermission target);
/// <summary>Creates and returns a string representation of the current permission object.</summary>
/// <returns>A string representation of the current permission object.</returns>
// Token: 0x060035A2 RID: 13730 RVA: 0x000B7E44 File Offset: 0x000B6044
public override string ToString()
{
SecurityElement securityElement = this.ToXml();
return securityElement.ToString();
}
/// <summary>When overridden in a derived class, creates an XML encoding of the security object and its current state.</summary>
/// <returns>An XML encoding of the security object, including any state information.</returns>
// Token: 0x060035A3 RID: 13731
public abstract SecurityElement ToXml();
/// <summary>When overridden in a derived class, creates a permission that is the union of the current permission and the specified permission.</summary>
/// <returns>A new permission that represents the union of the current permission and the specified permission.</returns>
/// <param name="other">A permission to combine with the current permission. It must be of the same type as the current permission. </param>
/// <exception cref="T:System.NotSupportedException">The <paramref name="other" /> parameter is not null. This method is only supported at this level when passed null. </exception>
// Token: 0x060035A4 RID: 13732 RVA: 0x000B7E60 File Offset: 0x000B6060
public virtual IPermission Union(IPermission other)
{
if (other != null)
{
throw new NotSupportedException();
}
return null;
}
/// <summary>Prevents callers higher in the call stack from using the code that calls this method to access all resources except for the resource specified by the current instance.</summary>
/// <exception cref="T:System.Security.SecurityException">There is already an active <see cref="M:System.Security.CodeAccessPermission.PermitOnly" /> for the current frame. </exception>
// Token: 0x060035A5 RID: 13733 RVA: 0x000B7E70 File Offset: 0x000B6070
[MonoTODO("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
public void PermitOnly()
{
}
/// <summary>Causes all previous overrides for the current frame to be removed and no longer in effect.</summary>
/// <exception cref="T:System.ExecutionEngineException">There is no previous <see cref="M:System.Security.CodeAccessPermission.Assert" />, <see cref="M:System.Security.CodeAccessPermission.Deny" />, or <see cref="M:System.Security.CodeAccessPermission.PermitOnly" /> for the current frame. </exception>
// Token: 0x060035A6 RID: 13734 RVA: 0x000B7E74 File Offset: 0x000B6074
[MonoTODO("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
public static void RevertAll()
{
}
/// <summary>Causes any previous <see cref="M:System.Security.CodeAccessPermission.Assert" /> for the current frame to be removed and no longer in effect.</summary>
/// <exception cref="T:System.ExecutionEngineException">There is no previous <see cref="M:System.Security.CodeAccessPermission.Assert" /> for the current frame. </exception>
// Token: 0x060035A7 RID: 13735 RVA: 0x000B7E78 File Offset: 0x000B6078
[MonoTODO("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
public static void RevertAssert()
{
}
/// <summary>Causes any previous <see cref="M:System.Security.CodeAccessPermission.Deny" /> for the current frame to be removed and no longer in effect.</summary>
/// <exception cref="T:System.ExecutionEngineException">There is no previous <see cref="M:System.Security.CodeAccessPermission.Deny" /> for the current frame. </exception>
// Token: 0x060035A8 RID: 13736 RVA: 0x000B7E7C File Offset: 0x000B607C
[MonoTODO("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
public static void RevertDeny()
{
}
/// <summary>Causes any previous <see cref="M:System.Security.CodeAccessPermission.PermitOnly" /> for the current frame to be removed and no longer in effect.</summary>
/// <exception cref="T:System.ExecutionEngineException">There is no previous <see cref="M:System.Security.CodeAccessPermission.PermitOnly" /> for the current frame. </exception>
// Token: 0x060035A9 RID: 13737 RVA: 0x000B7E80 File Offset: 0x000B6080
[MonoTODO("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
public static void RevertPermitOnly()
{
}
// Token: 0x060035AA RID: 13738 RVA: 0x000B7E84 File Offset: 0x000B6084
internal SecurityElement Element(int version)
{
SecurityElement securityElement = new SecurityElement("IPermission");
Type type = base.GetType();
securityElement.AddAttribute("class", type.FullName + ", " + type.Assembly.ToString().Replace('"', '\''));
securityElement.AddAttribute("version", version.ToString());
return securityElement;
}
// Token: 0x060035AB RID: 13739 RVA: 0x000B7EE8 File Offset: 0x000B60E8
internal static PermissionState CheckPermissionState(PermissionState state, bool allowUnrestricted)
{
if (state != PermissionState.None)
{
if (state != PermissionState.Unrestricted)
{
string text = string.Format(Locale.GetText("Invalid enum {0}"), state);
throw new ArgumentException(text, "state");
}
}
return state;
}
// Token: 0x060035AC RID: 13740 RVA: 0x000B7F38 File Offset: 0x000B6138
internal static int CheckSecurityElement(SecurityElement se, string parameterName, int minimumVersion, int maximumVersion)
{
if (se == null)
{
throw new ArgumentNullException(parameterName);
}
if (se.Tag != "IPermission")
{
string text = string.Format(Locale.GetText("Invalid tag {0}"), se.Tag);
throw new ArgumentException(text, parameterName);
}
int num = minimumVersion;
string text2 = se.Attribute("version");
if (text2 != null)
{
try
{
num = int.Parse(text2);
}
catch (Exception ex)
{
string text3 = Locale.GetText("Couldn't parse version from '{0}'.");
text3 = string.Format(text3, text2);
throw new ArgumentException(text3, parameterName, ex);
}
}
if (num < minimumVersion || num > maximumVersion)
{
string text4 = Locale.GetText("Unknown version '{0}', expected versions between ['{1}','{2}'].");
text4 = string.Format(text4, num, minimumVersion, maximumVersion);
throw new ArgumentException(text4, parameterName);
}
return num;
}
// Token: 0x060035AD RID: 13741 RVA: 0x000B8028 File Offset: 0x000B6228
internal static bool IsUnrestricted(SecurityElement se)
{
string text = se.Attribute("Unrestricted");
return text != null && string.Compare(text, bool.TrueString, true, CultureInfo.InvariantCulture) == 0;
}
// Token: 0x060035AE RID: 13742 RVA: 0x000B8060 File Offset: 0x000B6260
internal bool ProcessFrame(SecurityFrame frame)
{
if (frame.PermitOnly != null)
{
bool flag = frame.PermitOnly.IsUnrestricted();
if (!flag)
{
foreach (object obj in frame.PermitOnly)
{
IPermission permission = (IPermission)obj;
if (this.CheckPermitOnly(permission as CodeAccessPermission))
{
flag = true;
break;
}
}
}
if (!flag)
{
CodeAccessPermission.ThrowSecurityException(this, "PermitOnly", frame, SecurityAction.Demand, null);
}
}
if (frame.Deny != null)
{
if (frame.Deny.IsUnrestricted())
{
CodeAccessPermission.ThrowSecurityException(this, "Deny", frame, SecurityAction.Demand, null);
}
foreach (object obj2 in frame.Deny)
{
IPermission permission2 = (IPermission)obj2;
if (!this.CheckDeny(permission2 as CodeAccessPermission))
{
CodeAccessPermission.ThrowSecurityException(this, "Deny", frame, SecurityAction.Demand, permission2);
}
}
}
if (frame.Assert != null)
{
if (frame.Assert.IsUnrestricted())
{
return true;
}
foreach (object obj3 in frame.Assert)
{
IPermission permission3 = (IPermission)obj3;
if (this.CheckAssert(permission3 as CodeAccessPermission))
{
return true;
}
}
return false;
}
return false;
}
// Token: 0x060035AF RID: 13743 RVA: 0x000B8260 File Offset: 0x000B6460
internal static void ThrowInvalidPermission(IPermission target, Type expected)
{
string text = Locale.GetText("Invalid permission type '{0}', expected type '{1}'.");
text = string.Format(text, target.GetType(), expected);
throw new ArgumentException(text, "target");
}
// Token: 0x060035B0 RID: 13744 RVA: 0x000B8294 File Offset: 0x000B6494
internal static void ThrowExecutionEngineException(SecurityAction stackmod)
{
string text = Locale.GetText("No {0} modifier is present on the current stack frame.");
text = text + Environment.NewLine + "Currently only declarative stack modifiers are supported.";
throw new ExecutionEngineException(string.Format(text, stackmod));
}
// Token: 0x060035B1 RID: 13745 RVA: 0x000B82D0 File Offset: 0x000B64D0
internal static void ThrowSecurityException(object demanded, string message, SecurityFrame frame, SecurityAction action, IPermission failed)
{
throw new SecurityException(message);
}
}
}
@@ -0,0 +1,136 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Represents the abstract base class from which all implementations of asymmetric algorithms must inherit.</summary>
// Token: 0x020004E5 RID: 1253
[ComVisible(true)]
public abstract class AsymmetricAlgorithm : IDisposable
{
/// <summary>For a description of this member, see <see cref="M:System.IDisposable.Dispose" />.</summary>
// Token: 0x06002E7C RID: 11900 RVA: 0x000950A8 File Offset: 0x000932A8
void IDisposable.Dispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>When overridden in a derived class, gets the name of the key exchange algorithm.</summary>
/// <returns>The name of the key exchange algorithm.</returns>
// Token: 0x1700092A RID: 2346
// (get) Token: 0x06002E7D RID: 11901
public abstract string KeyExchangeAlgorithm { get; }
/// <summary>Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.</summary>
/// <returns>The size, in bits, of the key modulus used by the asymmetric algorithm.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key modulus size is invalid. </exception>
// Token: 0x1700092B RID: 2347
// (get) Token: 0x06002E7E RID: 11902 RVA: 0x000950B8 File Offset: 0x000932B8
// (set) Token: 0x06002E7F RID: 11903 RVA: 0x000950C0 File Offset: 0x000932C0
public virtual int KeySize
{
get
{
return this.KeySizeValue;
}
set
{
if (!KeySizes.IsLegalKeySize(this.LegalKeySizesValue, value))
{
throw new CryptographicException(Locale.GetText("Key size not supported by algorithm."));
}
this.KeySizeValue = value;
}
}
/// <summary>Gets the key sizes that are supported by the asymmetric algorithm.</summary>
/// <returns>An array that contains the key sizes supported by the asymmetric algorithm.</returns>
// Token: 0x1700092C RID: 2348
// (get) Token: 0x06002E80 RID: 11904 RVA: 0x000950F8 File Offset: 0x000932F8
public virtual KeySizes[] LegalKeySizes
{
get
{
return this.LegalKeySizesValue;
}
}
/// <summary>Gets the name of the signature algorithm.</summary>
/// <returns>The name of the signature algorithm.</returns>
// Token: 0x1700092D RID: 2349
// (get) Token: 0x06002E81 RID: 11905
public abstract string SignatureAlgorithm { get; }
/// <summary>Releases all resources used by the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> class.</summary>
// Token: 0x06002E82 RID: 11906 RVA: 0x00095100 File Offset: 0x00093300
public void Clear()
{
this.Dispose(false);
}
/// <summary>When overridden in a derived class, releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x06002E83 RID: 11907
protected abstract void Dispose(bool disposing);
/// <summary>When overridden in a derived class, reconstructs an <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> object from an XML string.</summary>
/// <param name="xmlString">The XML string to use to reconstruct the <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> object. </param>
// Token: 0x06002E84 RID: 11908
public abstract void FromXmlString(string xmlString);
/// <summary>When overridden in a derived class, creates and returns an XML string representation of the current <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> object.</summary>
/// <returns>An XML string encoding of the current <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> object.</returns>
/// <param name="includePrivateParameters">true to include private parameters; otherwise, false. </param>
// Token: 0x06002E85 RID: 11909
public abstract string ToXmlString(bool includePrivateParameters);
/// <summary>Creates an instance of the default implementation of an asymmetric algorithm.</summary>
/// <returns>A new <see cref="T:System.Security.Cryptography.RSACryptoServiceProvider" /> instance, unless the default settings have been changed with the &lt;cryptoClass&gt; element.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x06002E86 RID: 11910 RVA: 0x0009510C File Offset: 0x0009330C
public static AsymmetricAlgorithm Create()
{
return AsymmetricAlgorithm.Create("System.Security.Cryptography.AsymmetricAlgorithm");
}
/// <summary>Creates an instance of the specified implementation of an asymmetric algorithm.</summary>
/// <returns>A new instance of the specified asymmetric algorithm implementation.</returns>
/// <param name="algName">The asymmetric algorithm implementation to use. The following table shows the valid values for the <paramref name="algName" /> parameter and the algorithms they map to.Parameter valueImplements System.Security.Cryptography.AsymmetricAlgorithm<see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" />RSA<see cref="T:System.Security.Cryptography.RSA" />System.Security.Cryptography.RSA<see cref="T:System.Security.Cryptography.RSA" />DSA<see cref="T:System.Security.Cryptography.DSA" />System.Security.Cryptography.DSA<see cref="T:System.Security.Cryptography.DSA" />ECDsa<see cref="T:System.Security.Cryptography.ECDsa" />ECDsaCng<see cref="T:System.Security.Cryptography.ECDsaCng" />System.Security.Cryptography.ECDsaCng<see cref="T:System.Security.Cryptography.ECDsaCng" />ECDH<see cref="T:System.Security.Cryptography.ECDiffieHellman" />ECDiffieHellman<see cref="T:System.Security.Cryptography.ECDiffieHellman" />ECDiffieHellmanCng<see cref="T:System.Security.Cryptography.ECDiffieHellmanCng" />System.Security.Cryptography.ECDiffieHellmanCng<see cref="T:System.Security.Cryptography.ECDiffieHellmanCng" /></param>
// Token: 0x06002E87 RID: 11911 RVA: 0x00095118 File Offset: 0x00093318
public static AsymmetricAlgorithm Create(string algName)
{
return (AsymmetricAlgorithm)CryptoConfig.CreateFromName(algName);
}
// Token: 0x06002E88 RID: 11912 RVA: 0x00095128 File Offset: 0x00093328
internal static byte[] GetNamedParam(string xml, string param)
{
string text = "<" + param + ">";
int num = xml.IndexOf(text);
if (num == -1)
{
return null;
}
string text2 = "</" + param + ">";
int num2 = xml.IndexOf(text2);
if (num2 == -1 || num2 <= num)
{
return null;
}
num += text.Length;
string text3 = xml.Substring(num, num2 - num);
return Convert.FromBase64String(text3);
}
/// <summary>Represents the size, in bits, of the key modulus used by the asymmetric algorithm.</summary>
// Token: 0x04001267 RID: 4711
protected int KeySizeValue;
/// <summary>Specifies the key sizes that are supported by the asymmetric algorithm.</summary>
// Token: 0x04001268 RID: 4712
protected KeySizes[] LegalKeySizesValue;
}
}
@@ -0,0 +1,29 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Represents the base class from which all asymmetric key exchange deformatters derive.</summary>
// Token: 0x020004E6 RID: 1254
[ComVisible(true)]
public abstract class AsymmetricKeyExchangeDeformatter
{
/// <summary>When overridden in a derived class, gets or sets the parameters for the asymmetric key exchange.</summary>
/// <returns>A string in XML format containing the parameters of the asymmetric key exchange operation.</returns>
// Token: 0x1700092E RID: 2350
// (get) Token: 0x06002E8A RID: 11914
// (set) Token: 0x06002E8B RID: 11915
public abstract string Parameters { get; set; }
/// <summary>When overridden in a derived class, extracts secret information from the encrypted key exchange data.</summary>
/// <returns>The secret information derived from the key exchange data.</returns>
/// <param name="rgb">The key exchange data within which the secret information is hidden. </param>
// Token: 0x06002E8C RID: 11916
public abstract byte[] DecryptKeyExchange(byte[] rgb);
/// <summary>When overridden in a derived class, sets the private key to use for decrypting the secret information.</summary>
/// <param name="key">The instance of the implementation of <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> that holds the private key. </param>
// Token: 0x06002E8D RID: 11917
public abstract void SetKey(AsymmetricAlgorithm key);
}
}
@@ -0,0 +1,35 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Represents the base class from which all asymmetric key exchange formatters derive.</summary>
// Token: 0x020004E7 RID: 1255
[ComVisible(true)]
public abstract class AsymmetricKeyExchangeFormatter
{
/// <summary>When overridden in a derived class, gets the parameters for the asymmetric key exchange.</summary>
/// <returns>A string in XML format containing the parameters of the asymmetric key exchange operation.</returns>
// Token: 0x1700092F RID: 2351
// (get) Token: 0x06002E8F RID: 11919
public abstract string Parameters { get; }
/// <summary>When overridden in a derived class, creates the encrypted key exchange data from the specified input data.</summary>
/// <returns>The encrypted key exchange data to be sent to the intended recipient.</returns>
/// <param name="data">The secret information to be passed in the key exchange. </param>
// Token: 0x06002E90 RID: 11920
public abstract byte[] CreateKeyExchange(byte[] data);
/// <summary>When overridden in a derived class, creates the encrypted key exchange data from the specified input data.</summary>
/// <returns>The encrypted key exchange data to be sent to the intended recipient.</returns>
/// <param name="data">The secret information to be passed in the key exchange. </param>
/// <param name="symAlgType">This parameter is not used in the current version. </param>
// Token: 0x06002E91 RID: 11921
public abstract byte[] CreateKeyExchange(byte[] data, Type symAlgType);
/// <summary>When overridden in a derived class, sets the public key to use for encrypting the secret information.</summary>
/// <param name="key">The instance of the implementation of <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> that holds the public key. </param>
// Token: 0x06002E92 RID: 11922
public abstract void SetKey(AsymmetricAlgorithm key);
}
}
@@ -0,0 +1,44 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Represents the abstract base class from which all implementations of asymmetric signature deformatters derive.</summary>
// Token: 0x020004E8 RID: 1256
[ComVisible(true)]
public abstract class AsymmetricSignatureDeformatter
{
/// <summary>When overridden in a derived class, sets the hash algorithm to use for verifying the signature.</summary>
/// <param name="strName">The name of the hash algorithm to use for verifying the signature. </param>
// Token: 0x06002E94 RID: 11924
public abstract void SetHashAlgorithm(string strName);
/// <summary>When overridden in a derived class, sets the public key to use for verifying the signature.</summary>
/// <param name="key">The instance of an implementation of <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> that holds the public key. </param>
// Token: 0x06002E95 RID: 11925
public abstract void SetKey(AsymmetricAlgorithm key);
/// <summary>When overridden in a derived class, verifies the signature for the specified data.</summary>
/// <returns>true if <paramref name="rgbSignature" /> matches the signature computed using the specified hash algorithm and key on <paramref name="rgbHash" />; otherwise, false.</returns>
/// <param name="rgbHash">The data signed with <paramref name="rgbSignature" />. </param>
/// <param name="rgbSignature">The signature to be verified for <paramref name="rgbHash" />. </param>
// Token: 0x06002E96 RID: 11926
public abstract bool VerifySignature(byte[] rgbHash, byte[] rgbSignature);
/// <summary>Verifies the signature from the specified hash value.</summary>
/// <returns>true if the signature is valid for the hash; otherwise, false.</returns>
/// <param name="hash">The hash algorithm to use to verify the signature. </param>
/// <param name="rgbSignature">The signature to be verified. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="hash" /> parameter is null. </exception>
// Token: 0x06002E97 RID: 11927 RVA: 0x000951B4 File Offset: 0x000933B4
public virtual bool VerifySignature(HashAlgorithm hash, byte[] rgbSignature)
{
if (hash == null)
{
throw new ArgumentNullException("hash");
}
this.SetHashAlgorithm(hash.ToString());
return this.VerifySignature(hash.Hash, rgbSignature);
}
}
}
@@ -0,0 +1,42 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Represents the base class from which all implementations of asymmetric signature formatters derive.</summary>
// Token: 0x020004E9 RID: 1257
[ComVisible(true)]
public abstract class AsymmetricSignatureFormatter
{
/// <summary>When overridden in a derived class, sets the hash algorithm to use for creating the signature.</summary>
/// <param name="strName">The name of the hash algorithm to use for creating the signature. </param>
// Token: 0x06002E99 RID: 11929
public abstract void SetHashAlgorithm(string strName);
/// <summary>When overridden in a derived class, sets the asymmetric algorithm to use to create the signature.</summary>
/// <param name="key">The instance of the implementation of <see cref="T:System.Security.Cryptography.AsymmetricAlgorithm" /> to use to create the signature. </param>
// Token: 0x06002E9A RID: 11930
public abstract void SetKey(AsymmetricAlgorithm key);
/// <summary>When overridden in a derived class, creates the signature for the specified data.</summary>
/// <returns>The digital signature for the <paramref name="rgbHash" /> parameter.</returns>
/// <param name="rgbHash">The data to be signed. </param>
// Token: 0x06002E9B RID: 11931
public abstract byte[] CreateSignature(byte[] rgbHash);
/// <summary>Creates the signature from the specified hash value.</summary>
/// <returns>The signature for the specified hash value.</returns>
/// <param name="hash">The hash algorithm to use to create the signature. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="hash" /> parameter is null. </exception>
// Token: 0x06002E9C RID: 11932 RVA: 0x000951F4 File Offset: 0x000933F4
public virtual byte[] CreateSignature(HashAlgorithm hash)
{
if (hash == null)
{
throw new ArgumentNullException("hash");
}
this.SetHashAlgorithm(hash.ToString());
return this.CreateSignature(hash.Hash);
}
}
}
@@ -0,0 +1,38 @@
using System;
namespace System.Security.Cryptography
{
// Token: 0x020004EA RID: 1258
internal static class Base64Constants
{
// Token: 0x04001269 RID: 4713
public static readonly byte[] EncodeTable = new byte[]
{
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 97, 98, 99, 100,
101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
121, 122, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 43, 47
};
// Token: 0x0400126A RID: 4714
public static readonly byte[] DecodeTable = new byte[]
{
byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue,
byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue,
byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue,
byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue,
byte.MaxValue, byte.MaxValue, byte.MaxValue, 62, byte.MaxValue, byte.MaxValue, byte.MaxValue, 63, 52, 53,
54, 55, 56, 57, 58, 59, 60, 61, byte.MaxValue, byte.MaxValue,
byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, 0, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51
};
}
}
@@ -0,0 +1,28 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Specifies the block cipher mode to use for encryption.</summary>
// Token: 0x020004EB RID: 1259
[ComVisible(true)]
[Serializable]
public enum CipherMode
{
/// <summary>The Cipher Block Chaining (CBC) mode introduces feedback. Before each plain text block is encrypted, it is combined with the cipher text of the previous block by a bitwise exclusive OR operation. This ensures that even if the plain text contains many identical blocks, they will each encrypt to a different cipher text block. The initialization vector is combined with the first plain text block by a bitwise exclusive OR operation before the block is encrypted. If a single bit of the cipher text block is mangled, the corresponding plain text block will also be mangled. In addition, a bit in the subsequent block, in the same position as the original mangled bit, will be mangled.</summary>
// Token: 0x0400126C RID: 4716
CBC = 1,
/// <summary>The Electronic Codebook (ECB) mode encrypts each block individually. Any blocks of plain text that are identical and in the same message, or that are in a different message encrypted with the same key, will be transformed into identical cipher text blocks. Important:  This mode is not recommended because it opens the door for multiple security exploits. If the plain text to be encrypted contains substantial repetition, it is feasible for the cipher text to be broken one block at a time. It is also possible to use block analysis to determine the encryption key. Also, an active adversary can substitute and exchange individual blocks without detection, which allows blocks to be saved and inserted into the stream at other points without detection.</summary>
// Token: 0x0400126D RID: 4717
ECB,
/// <summary>The Output Feedback (OFB) mode processes small increments of plain text into cipher text instead of processing an entire block at a time. This mode is similar to CFB; the only difference between the two modes is the way that the shift register is filled. If a bit in the cipher text is mangled, the corresponding bit of plain text will be mangled. However, if there are extra or missing bits from the cipher text, the plain text will be mangled from that point on.</summary>
// Token: 0x0400126E RID: 4718
OFB,
/// <summary>The Cipher Feedback (CFB) mode processes small increments of plain text into cipher text, instead of processing an entire block at a time. This mode uses a shift register that is one block in length and is divided into sections. For example, if the block size is 8 bytes, with one byte processed at a time, the shift register is divided into eight sections. If a bit in the cipher text is mangled, one plain text bit is mangled and the shift register is corrupted. This results in the next several plain text increments being mangled until the bad bit is shifted out of the shift register. The default feedback size can vary by algorithm, but is typically either 8 bits or the number of bits of the block size. You can alter the number of feedback bits by using the <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.FeedbackSize" /> property. Algorithms that support CFB use this property to set the feedback.</summary>
// Token: 0x0400126F RID: 4719
CFB,
/// <summary>The Cipher Text Stealing (CTS) mode handles any length of plain text and produces cipher text whose length matches the plain text length. This mode behaves like the CBC mode for all but the last two blocks of the plain text.</summary>
// Token: 0x04001270 RID: 4720
CTS
}
}
@@ -0,0 +1,149 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Performs a cryptographic transformation of data. This class cannot be inherited.</summary>
// Token: 0x020004EC RID: 1260
[ComVisible(true)]
public sealed class CryptoAPITransform : IDisposable, ICryptoTransform
{
// Token: 0x06002E9E RID: 11934 RVA: 0x00095268 File Offset: 0x00093468
internal CryptoAPITransform()
{
this.m_disposed = false;
}
/// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
// Token: 0x06002E9F RID: 11935 RVA: 0x00095278 File Offset: 0x00093478
void IDisposable.Dispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>Gets a value indicating whether the current transform can be reused.</summary>
/// <returns>Always true.</returns>
// Token: 0x17000930 RID: 2352
// (get) Token: 0x06002EA0 RID: 11936 RVA: 0x00095288 File Offset: 0x00093488
public bool CanReuseTransform
{
get
{
return true;
}
}
/// <summary>Gets a value indicating whether multiple blocks can be transformed.</summary>
/// <returns>true if multiple blocks can be transformed; otherwise, false.</returns>
// Token: 0x17000931 RID: 2353
// (get) Token: 0x06002EA1 RID: 11937 RVA: 0x0009528C File Offset: 0x0009348C
public bool CanTransformMultipleBlocks
{
get
{
return true;
}
}
/// <summary>Gets the input block size.</summary>
/// <returns>The input block size in bytes.</returns>
// Token: 0x17000932 RID: 2354
// (get) Token: 0x06002EA2 RID: 11938 RVA: 0x00095290 File Offset: 0x00093490
public int InputBlockSize
{
get
{
return 0;
}
}
/// <summary>Gets the key handle.</summary>
/// <returns>The key handle.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000933 RID: 2355
// (get) Token: 0x06002EA3 RID: 11939 RVA: 0x00095294 File Offset: 0x00093494
public IntPtr KeyHandle
{
get
{
return IntPtr.Zero;
}
}
/// <summary>Gets the output block size.</summary>
/// <returns>The output block size in bytes.</returns>
// Token: 0x17000934 RID: 2356
// (get) Token: 0x06002EA4 RID: 11940 RVA: 0x0009529C File Offset: 0x0009349C
public int OutputBlockSize
{
get
{
return 0;
}
}
/// <summary>Releases all resources used by the <see cref="T:System.Security.Cryptography.CryptoAPITransform" /> method.</summary>
// Token: 0x06002EA5 RID: 11941 RVA: 0x000952A0 File Offset: 0x000934A0
public void Clear()
{
this.Dispose(false);
}
// Token: 0x06002EA6 RID: 11942 RVA: 0x000952AC File Offset: 0x000934AC
private void Dispose(bool disposing)
{
if (!this.m_disposed)
{
if (disposing)
{
}
this.m_disposed = true;
}
}
/// <summary>Computes the transformation for the specified region of the input byte array and copies the resulting transformation to the specified region of the output byte array.</summary>
/// <returns>The number of bytes written.</returns>
/// <param name="inputBuffer">The input on which to perform the operation on. </param>
/// <param name="inputOffset">The offset into the input byte array from which to begin using data from. </param>
/// <param name="inputCount">The number of bytes in the input byte array to use as data. </param>
/// <param name="outputBuffer">The output to which to write the data to. </param>
/// <param name="outputOffset">The offset into the output byte array from which to begin writing data from. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="inputBuffer" /> parameter is null.-or- The <paramref name="outputBuffer" /> parameter is null. </exception>
/// <exception cref="T:System.ArgumentException">The length of the input buffer is less than the sum of the input offset and the input count. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="inputOffset" /> is out of range. This parameter requires a non-negative number.</exception>
// Token: 0x06002EA7 RID: 11943 RVA: 0x000952C8 File Offset: 0x000934C8
public int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
{
return 0;
}
/// <summary>Computes the transformation for the specified region of the specified byte array.</summary>
/// <returns>The computed transformation.</returns>
/// <param name="inputBuffer">The input on which to perform the operation on. </param>
/// <param name="inputOffset">The offset into the byte array from which to begin using data from. </param>
/// <param name="inputCount">The number of bytes in the byte array to use as data. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="inputBuffer" /> parameter is null. </exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="inputOffset" /> parameter is less than zero.-or- The <paramref name="inputCount" /> parameter is less than zero.-or- The length of the input buffer is less than the sum of the input offset and the input count. </exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <see cref="F:System.Security.Cryptography.PaddingMode.PKCS7" /> padding is invalid. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="inputOffset" /> parameter is out of range. This parameter requires a non-negative number.</exception>
// Token: 0x06002EA8 RID: 11944 RVA: 0x000952CC File Offset: 0x000934CC
public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount)
{
return null;
}
/// <summary>Resets the internal state of <see cref="T:System.Security.Cryptography.CryptoAPITransform" /> so that it can be used again to do a different encryption or decryption.</summary>
// Token: 0x06002EA9 RID: 11945 RVA: 0x000952D0 File Offset: 0x000934D0
[ComVisible(false)]
public void Reset()
{
}
// Token: 0x04001271 RID: 4721
private bool m_disposed;
}
}
@@ -0,0 +1,890 @@
using System;
using System.Collections;
using System.IO;
using System.Runtime.InteropServices;
using Mono.Xml;
namespace System.Security.Cryptography
{
/// <summary>Accesses the cryptography configuration information.</summary>
// Token: 0x020004ED RID: 1261
[ComVisible(true)]
public class CryptoConfig
{
// Token: 0x06002EAC RID: 11948 RVA: 0x000952E8 File Offset: 0x000934E8
private static void Initialize()
{
Hashtable hashtable = new Hashtable(new CaseInsensitiveHashCodeProvider(), new CaseInsensitiveComparer());
hashtable.Add("SHA", "System.Security.Cryptography.SHA1CryptoServiceProvider");
hashtable.Add("SHA1", "System.Security.Cryptography.SHA1CryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.SHA1", "System.Security.Cryptography.SHA1CryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.HashAlgorithm", "System.Security.Cryptography.SHA1CryptoServiceProvider");
hashtable.Add("MD5", "System.Security.Cryptography.MD5CryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.MD5", "System.Security.Cryptography.MD5CryptoServiceProvider");
hashtable.Add("SHA256", "System.Security.Cryptography.SHA256Managed");
hashtable.Add("SHA-256", "System.Security.Cryptography.SHA256Managed");
hashtable.Add("System.Security.Cryptography.SHA256", "System.Security.Cryptography.SHA256Managed");
hashtable.Add("SHA384", "System.Security.Cryptography.SHA384Managed");
hashtable.Add("SHA-384", "System.Security.Cryptography.SHA384Managed");
hashtable.Add("System.Security.Cryptography.SHA384", "System.Security.Cryptography.SHA384Managed");
hashtable.Add("SHA512", "System.Security.Cryptography.SHA512Managed");
hashtable.Add("SHA-512", "System.Security.Cryptography.SHA512Managed");
hashtable.Add("System.Security.Cryptography.SHA512", "System.Security.Cryptography.SHA512Managed");
hashtable.Add("RSA", "System.Security.Cryptography.RSACryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.RSA", "System.Security.Cryptography.RSACryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.AsymmetricAlgorithm", "System.Security.Cryptography.RSACryptoServiceProvider");
hashtable.Add("DSA", "System.Security.Cryptography.DSACryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.DSA", "System.Security.Cryptography.DSACryptoServiceProvider");
hashtable.Add("DES", "System.Security.Cryptography.DESCryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.DES", "System.Security.Cryptography.DESCryptoServiceProvider");
hashtable.Add("3DES", "System.Security.Cryptography.TripleDESCryptoServiceProvider");
hashtable.Add("TripleDES", "System.Security.Cryptography.TripleDESCryptoServiceProvider");
hashtable.Add("Triple DES", "System.Security.Cryptography.TripleDESCryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.TripleDES", "System.Security.Cryptography.TripleDESCryptoServiceProvider");
hashtable.Add("RC2", "System.Security.Cryptography.RC2CryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.RC2", "System.Security.Cryptography.RC2CryptoServiceProvider");
hashtable.Add("Rijndael", "System.Security.Cryptography.RijndaelManaged");
hashtable.Add("System.Security.Cryptography.Rijndael", "System.Security.Cryptography.RijndaelManaged");
hashtable.Add("System.Security.Cryptography.SymmetricAlgorithm", "System.Security.Cryptography.RijndaelManaged");
hashtable.Add("RandomNumberGenerator", "System.Security.Cryptography.RNGCryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.RandomNumberGenerator", "System.Security.Cryptography.RNGCryptoServiceProvider");
hashtable.Add("System.Security.Cryptography.KeyedHashAlgorithm", "System.Security.Cryptography.HMACSHA1");
hashtable.Add("HMACSHA1", "System.Security.Cryptography.HMACSHA1");
hashtable.Add("System.Security.Cryptography.HMACSHA1", "System.Security.Cryptography.HMACSHA1");
hashtable.Add("MACTripleDES", "System.Security.Cryptography.MACTripleDES");
hashtable.Add("System.Security.Cryptography.MACTripleDES", "System.Security.Cryptography.MACTripleDES");
hashtable.Add("RIPEMD160", "System.Security.Cryptography.RIPEMD160Managed");
hashtable.Add("RIPEMD-160", "System.Security.Cryptography.RIPEMD160Managed");
hashtable.Add("System.Security.Cryptography.RIPEMD160", "System.Security.Cryptography.RIPEMD160Managed");
hashtable.Add("System.Security.Cryptography.HMAC", "System.Security.Cryptography.HMACSHA1");
hashtable.Add("HMACMD5", "System.Security.Cryptography.HMACMD5");
hashtable.Add("System.Security.Cryptography.HMACMD5", "System.Security.Cryptography.HMACMD5");
hashtable.Add("HMACRIPEMD160", "System.Security.Cryptography.HMACRIPEMD160");
hashtable.Add("System.Security.Cryptography.HMACRIPEMD160", "System.Security.Cryptography.HMACRIPEMD160");
hashtable.Add("HMACSHA256", "System.Security.Cryptography.HMACSHA256");
hashtable.Add("System.Security.Cryptography.HMACSHA256", "System.Security.Cryptography.HMACSHA256");
hashtable.Add("HMACSHA384", "System.Security.Cryptography.HMACSHA384");
hashtable.Add("System.Security.Cryptography.HMACSHA384", "System.Security.Cryptography.HMACSHA384");
hashtable.Add("HMACSHA512", "System.Security.Cryptography.HMACSHA512");
hashtable.Add("System.Security.Cryptography.HMACSHA512", "System.Security.Cryptography.HMACSHA512");
hashtable.Add("http://www.w3.org/2000/09/xmldsig#dsa-sha1", "System.Security.Cryptography.DSASignatureDescription");
hashtable.Add("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.RSAPKCS1SHA1SignatureDescription");
hashtable.Add("http://www.w3.org/2000/09/xmldsig#sha1", "System.Security.Cryptography.SHA1CryptoServiceProvider");
hashtable.Add("http://www.w3.org/TR/2001/REC-xml-c14n-20010315", "System.Security.Cryptography.Xml.XmlDsigC14NTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments", "System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2000/09/xmldsig#base64", "System.Security.Cryptography.Xml.XmlDsigBase64Transform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/TR/1999/REC-xpath-19991116", "System.Security.Cryptography.Xml.XmlDsigXPathTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/TR/1999/REC-xslt-19991116", "System.Security.Cryptography.Xml.XmlDsigXsltTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2000/09/xmldsig#enveloped-signature", "System.Security.Cryptography.Xml.XmlDsigEnvelopedSignatureTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2001/10/xml-exc-c14n#", "System.Security.Cryptography.Xml.XmlDsigExcC14NTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2001/10/xml-exc-c14n#WithComments", "System.Security.Cryptography.Xml.XmlDsigExcC14NWithCommentsTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2002/07/decrypt#XML", "System.Security.Cryptography.Xml.XmlDecryptionTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2001/04/xmlenc#sha256", "System.Security.Cryptography.SHA256Managed");
hashtable.Add("http://www.w3.org/2001/04/xmlenc#sha512", "System.Security.Cryptography.SHA512Managed");
hashtable.Add("http://www.w3.org/2001/04/xmldsig-more#hmac-sha256", "System.Security.Cryptography.HMACSHA256");
hashtable.Add("http://www.w3.org/2001/04/xmldsig-more#hmac-sha384", "System.Security.Cryptography.HMACSHA384");
hashtable.Add("http://www.w3.org/2001/04/xmldsig-more#hmac-sha512", "System.Security.Cryptography.HMACSHA512");
hashtable.Add("http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160", "System.Security.Cryptography.HMACRIPEMD160");
hashtable.Add("http://www.w3.org/2000/09/xmldsig# X509Data", "System.Security.Cryptography.Xml.KeyInfoX509Data, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2000/09/xmldsig# KeyName", "System.Security.Cryptography.Xml.KeyInfoName, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2000/09/xmldsig# KeyValue/DSAKeyValue", "System.Security.Cryptography.Xml.DSAKeyValue, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2000/09/xmldsig# KeyValue/RSAKeyValue", "System.Security.Cryptography.Xml.RSAKeyValue, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("http://www.w3.org/2000/09/xmldsig# RetrievalMethod", "System.Security.Cryptography.Xml.KeyInfoRetrievalMethod, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
hashtable.Add("2.5.29.14", "System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierExtension, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
hashtable.Add("2.5.29.15", "System.Security.Cryptography.X509Certificates.X509KeyUsageExtension, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
hashtable.Add("2.5.29.19", "System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
hashtable.Add("2.5.29.37", "System.Security.Cryptography.X509Certificates.X509EnhancedKeyUsageExtension, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
hashtable.Add("X509Chain", "System.Security.Cryptography.X509Certificates.X509Chain, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
Hashtable hashtable2 = new Hashtable(new CaseInsensitiveHashCodeProvider(), new CaseInsensitiveComparer());
hashtable2.Add("System.Security.Cryptography.SHA1CryptoServiceProvider", "1.3.14.3.2.26");
hashtable2.Add("System.Security.Cryptography.SHA1Managed", "1.3.14.3.2.26");
hashtable2.Add("SHA1", "1.3.14.3.2.26");
hashtable2.Add("System.Security.Cryptography.SHA1", "1.3.14.3.2.26");
hashtable2.Add("System.Security.Cryptography.MD5CryptoServiceProvider", "1.2.840.113549.2.5");
hashtable2.Add("MD5", "1.2.840.113549.2.5");
hashtable2.Add("System.Security.Cryptography.MD5", "1.2.840.113549.2.5");
hashtable2.Add("System.Security.Cryptography.SHA256Managed", "2.16.840.1.101.3.4.2.1");
hashtable2.Add("SHA256", "2.16.840.1.101.3.4.2.1");
hashtable2.Add("System.Security.Cryptography.SHA256", "2.16.840.1.101.3.4.2.1");
hashtable2.Add("System.Security.Cryptography.SHA384Managed", "2.16.840.1.101.3.4.2.2");
hashtable2.Add("SHA384", "2.16.840.1.101.3.4.2.2");
hashtable2.Add("System.Security.Cryptography.SHA384", "2.16.840.1.101.3.4.2.2");
hashtable2.Add("System.Security.Cryptography.SHA512Managed", "2.16.840.1.101.3.4.2.3");
hashtable2.Add("SHA512", "2.16.840.1.101.3.4.2.3");
hashtable2.Add("System.Security.Cryptography.SHA512", "2.16.840.1.101.3.4.2.3");
hashtable2.Add("TripleDESKeyWrap", "1.2.840.113549.1.9.16.3.6");
hashtable2.Add("DES", "1.3.14.3.2.7");
hashtable2.Add("TripleDES", "1.2.840.113549.3.7");
hashtable2.Add("RC2", "1.2.840.113549.3.2");
CryptoConfig.algorithms = hashtable;
CryptoConfig.oid = hashtable2;
}
// Token: 0x06002EAD RID: 11949 RVA: 0x00095964 File Offset: 0x00093B64
private static void LoadConfig(string filename, Hashtable algorithms, Hashtable oid)
{
if (!File.Exists(filename))
{
return;
}
try
{
using (TextReader textReader = new StreamReader(filename))
{
CryptoConfig.CryptoHandler cryptoHandler = new CryptoConfig.CryptoHandler(algorithms, oid);
SmallXmlParser smallXmlParser = new SmallXmlParser();
smallXmlParser.Parse(textReader, cryptoHandler);
}
}
catch
{
}
}
/// <summary>Creates a new instance of the specified cryptographic object.</summary>
/// <returns>A new instance of the specified cryptographic object.</returns>
/// <param name="name">The simple name of the cryptographic object of which to create an instance. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Reflection.TargetInvocationException">The algorithm described by the <paramref name="name" /> parameter was used with Federal Information Processing Standards (FIPS) mode enabled, but is not FIPS compatible.</exception>
// Token: 0x06002EAE RID: 11950 RVA: 0x000959EC File Offset: 0x00093BEC
public static object CreateFromName(string name)
{
return CryptoConfig.CreateFromName(name, null);
}
/// <summary>Creates a new instance of the specified cryptographic object with the specified arguments.</summary>
/// <returns>A new instance of the specified cryptographic object.</returns>
/// <param name="name">The simple name of the cryptographic object of which to create an instance. </param>
/// <param name="args">The arguments used to create the specified cryptographic object. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
/// <exception cref="T:System.Reflection.TargetInvocationException">The algorithm described by the <paramref name="name" /> parameter was used with Federal Information Processing Standards (FIPS) mode enabled, but is not FIPS compatible.</exception>
// Token: 0x06002EAF RID: 11951 RVA: 0x000959F8 File Offset: 0x00093BF8
public static object CreateFromName(string name, params object[] args)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
object obj = CryptoConfig.lockObject;
lock (obj)
{
if (CryptoConfig.algorithms == null)
{
CryptoConfig.Initialize();
}
}
object obj2;
try
{
string text = (string)CryptoConfig.algorithms[name];
if (text == null)
{
text = name;
}
Type type = Type.GetType(text);
obj2 = Activator.CreateInstance(type, args);
}
catch
{
obj2 = null;
}
return obj2;
}
/// <summary>Gets the object identifier (OID) of the algorithm corresponding to the specified simple name.</summary>
/// <returns>The OID of the specified algorithm.</returns>
/// <param name="name">The simple name of the algorithm for which to get the OID. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="name" /> parameter is null. </exception>
// Token: 0x06002EB0 RID: 11952 RVA: 0x00095AB4 File Offset: 0x00093CB4
public static string MapNameToOID(string name)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
object obj = CryptoConfig.lockObject;
lock (obj)
{
if (CryptoConfig.oid == null)
{
CryptoConfig.Initialize();
}
}
return (string)CryptoConfig.oid[name];
}
/// <summary>Encodes the specified object identifier (OID).</summary>
/// <returns>A byte array containing the encoded OID.</returns>
/// <param name="str">The OID to encode. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="str" /> parameter is null. </exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException">An error occurred while encoding the OID. </exception>
// Token: 0x06002EB1 RID: 11953 RVA: 0x00095B28 File Offset: 0x00093D28
public static byte[] EncodeOID(string str)
{
if (str == null)
{
throw new ArgumentNullException("str");
}
char[] array = new char[] { '.' };
string[] array2 = str.Split(array);
if (array2.Length < 2)
{
throw new CryptographicUnexpectedOperationException(Locale.GetText("OID must have at least two parts"));
}
byte[] array3 = new byte[str.Length];
try
{
byte b = Convert.ToByte(array2[0]);
byte b2 = Convert.ToByte(array2[1]);
array3[2] = Convert.ToByte((int)(b * 40 + b2));
}
catch
{
throw new CryptographicUnexpectedOperationException(Locale.GetText("Invalid OID"));
}
int num = 3;
for (int i = 2; i < array2.Length; i++)
{
long num2 = Convert.ToInt64(array2[i]);
if (num2 > 127L)
{
byte[] array4 = CryptoConfig.EncodeLongNumber(num2);
Buffer.BlockCopy(array4, 0, array3, num, array4.Length);
num += array4.Length;
}
else
{
array3[num++] = Convert.ToByte(num2);
}
}
int num3 = 2;
byte[] array5 = new byte[num];
array5[0] = 6;
if (num > 127)
{
throw new CryptographicUnexpectedOperationException(Locale.GetText("OID > 127 bytes"));
}
array5[1] = Convert.ToByte(num - 2);
Buffer.BlockCopy(array3, num3, array5, num3, num - num3);
return array5;
}
// Token: 0x06002EB2 RID: 11954 RVA: 0x00095C88 File Offset: 0x00093E88
private static byte[] EncodeLongNumber(long x)
{
if (x > 2147483647L || x < -2147483648L)
{
throw new OverflowException(Locale.GetText("Part of OID doesn't fit in Int32"));
}
long num = x;
int num2 = 1;
while (num > 127L)
{
num >>= 7;
num2++;
}
byte[] array = new byte[num2];
for (int i = 0; i < num2; i++)
{
num = x >> 7 * i;
num &= 127L;
if (i != 0)
{
num += 128L;
}
array[num2 - i - 1] = Convert.ToByte(num);
}
return array;
}
// Token: 0x04001272 RID: 4722
private const string defaultNamespace = "System.Security.Cryptography.";
// Token: 0x04001273 RID: 4723
private const string defaultSHA1 = "System.Security.Cryptography.SHA1CryptoServiceProvider";
// Token: 0x04001274 RID: 4724
private const string defaultMD5 = "System.Security.Cryptography.MD5CryptoServiceProvider";
// Token: 0x04001275 RID: 4725
private const string defaultSHA256 = "System.Security.Cryptography.SHA256Managed";
// Token: 0x04001276 RID: 4726
private const string defaultSHA384 = "System.Security.Cryptography.SHA384Managed";
// Token: 0x04001277 RID: 4727
private const string defaultSHA512 = "System.Security.Cryptography.SHA512Managed";
// Token: 0x04001278 RID: 4728
private const string defaultRSA = "System.Security.Cryptography.RSACryptoServiceProvider";
// Token: 0x04001279 RID: 4729
private const string defaultDSA = "System.Security.Cryptography.DSACryptoServiceProvider";
// Token: 0x0400127A RID: 4730
private const string defaultDES = "System.Security.Cryptography.DESCryptoServiceProvider";
// Token: 0x0400127B RID: 4731
private const string default3DES = "System.Security.Cryptography.TripleDESCryptoServiceProvider";
// Token: 0x0400127C RID: 4732
private const string defaultRC2 = "System.Security.Cryptography.RC2CryptoServiceProvider";
// Token: 0x0400127D RID: 4733
private const string defaultAES = "System.Security.Cryptography.RijndaelManaged";
// Token: 0x0400127E RID: 4734
private const string defaultRNG = "System.Security.Cryptography.RNGCryptoServiceProvider";
// Token: 0x0400127F RID: 4735
private const string defaultHMAC = "System.Security.Cryptography.HMACSHA1";
// Token: 0x04001280 RID: 4736
private const string defaultMAC3DES = "System.Security.Cryptography.MACTripleDES";
// Token: 0x04001281 RID: 4737
private const string defaultDSASigDesc = "System.Security.Cryptography.DSASignatureDescription";
// Token: 0x04001282 RID: 4738
private const string defaultRSASigDesc = "System.Security.Cryptography.RSAPKCS1SHA1SignatureDescription";
// Token: 0x04001283 RID: 4739
private const string defaultRIPEMD160 = "System.Security.Cryptography.RIPEMD160Managed";
// Token: 0x04001284 RID: 4740
private const string defaultHMACMD5 = "System.Security.Cryptography.HMACMD5";
// Token: 0x04001285 RID: 4741
private const string defaultHMACRIPEMD160 = "System.Security.Cryptography.HMACRIPEMD160";
// Token: 0x04001286 RID: 4742
private const string defaultHMACSHA256 = "System.Security.Cryptography.HMACSHA256";
// Token: 0x04001287 RID: 4743
private const string defaultHMACSHA384 = "System.Security.Cryptography.HMACSHA384";
// Token: 0x04001288 RID: 4744
private const string defaultHMACSHA512 = "System.Security.Cryptography.HMACSHA512";
// Token: 0x04001289 RID: 4745
private const string defaultC14N = "System.Security.Cryptography.Xml.XmlDsigC14NTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x0400128A RID: 4746
private const string defaultC14NWithComments = "System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x0400128B RID: 4747
private const string defaultBase64 = "System.Security.Cryptography.Xml.XmlDsigBase64Transform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x0400128C RID: 4748
private const string defaultXPath = "System.Security.Cryptography.Xml.XmlDsigXPathTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x0400128D RID: 4749
private const string defaultXslt = "System.Security.Cryptography.Xml.XmlDsigXsltTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x0400128E RID: 4750
private const string defaultEnveloped = "System.Security.Cryptography.Xml.XmlDsigEnvelopedSignatureTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x0400128F RID: 4751
private const string defaultXmlDecryption = "System.Security.Cryptography.Xml.XmlDecryptionTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x04001290 RID: 4752
private const string defaultExcC14N = "System.Security.Cryptography.Xml.XmlDsigExcC14NTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x04001291 RID: 4753
private const string defaultExcC14NWithComments = "System.Security.Cryptography.Xml.XmlDsigExcC14NWithCommentsTransform, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x04001292 RID: 4754
private const string defaultX509Data = "System.Security.Cryptography.Xml.KeyInfoX509Data, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x04001293 RID: 4755
private const string defaultKeyName = "System.Security.Cryptography.Xml.KeyInfoName, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x04001294 RID: 4756
private const string defaultKeyValueDSA = "System.Security.Cryptography.Xml.DSAKeyValue, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x04001295 RID: 4757
private const string defaultKeyValueRSA = "System.Security.Cryptography.Xml.RSAKeyValue, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x04001296 RID: 4758
private const string defaultRetrievalMethod = "System.Security.Cryptography.Xml.KeyInfoRetrievalMethod, System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
// Token: 0x04001297 RID: 4759
private const string managedSHA1 = "System.Security.Cryptography.SHA1Managed";
// Token: 0x04001298 RID: 4760
private const string oidSHA1 = "1.3.14.3.2.26";
// Token: 0x04001299 RID: 4761
private const string oidMD5 = "1.2.840.113549.2.5";
// Token: 0x0400129A RID: 4762
private const string oidSHA256 = "2.16.840.1.101.3.4.2.1";
// Token: 0x0400129B RID: 4763
private const string oidSHA384 = "2.16.840.1.101.3.4.2.2";
// Token: 0x0400129C RID: 4764
private const string oidSHA512 = "2.16.840.1.101.3.4.2.3";
// Token: 0x0400129D RID: 4765
private const string oidDSA = "1.2.840.10040.4.1";
// Token: 0x0400129E RID: 4766
private const string oidDES = "1.3.14.3.2.7";
// Token: 0x0400129F RID: 4767
private const string oid3DES = "1.2.840.113549.3.7";
// Token: 0x040012A0 RID: 4768
private const string oidRC2 = "1.2.840.113549.3.2";
// Token: 0x040012A1 RID: 4769
private const string oid3DESKeyWrap = "1.2.840.113549.1.9.16.3.6";
// Token: 0x040012A2 RID: 4770
private const string nameSHA1a = "SHA";
// Token: 0x040012A3 RID: 4771
private const string nameSHA1b = "SHA1";
// Token: 0x040012A4 RID: 4772
private const string nameSHA1c = "System.Security.Cryptography.SHA1";
// Token: 0x040012A5 RID: 4773
private const string nameSHA1d = "System.Security.Cryptography.HashAlgorithm";
// Token: 0x040012A6 RID: 4774
private const string nameMD5a = "MD5";
// Token: 0x040012A7 RID: 4775
private const string nameMD5b = "System.Security.Cryptography.MD5";
// Token: 0x040012A8 RID: 4776
private const string nameSHA256a = "SHA256";
// Token: 0x040012A9 RID: 4777
private const string nameSHA256b = "SHA-256";
// Token: 0x040012AA RID: 4778
private const string nameSHA256c = "System.Security.Cryptography.SHA256";
// Token: 0x040012AB RID: 4779
private const string nameSHA384a = "SHA384";
// Token: 0x040012AC RID: 4780
private const string nameSHA384b = "SHA-384";
// Token: 0x040012AD RID: 4781
private const string nameSHA384c = "System.Security.Cryptography.SHA384";
// Token: 0x040012AE RID: 4782
private const string nameSHA512a = "SHA512";
// Token: 0x040012AF RID: 4783
private const string nameSHA512b = "SHA-512";
// Token: 0x040012B0 RID: 4784
private const string nameSHA512c = "System.Security.Cryptography.SHA512";
// Token: 0x040012B1 RID: 4785
private const string nameRSAa = "RSA";
// Token: 0x040012B2 RID: 4786
private const string nameRSAb = "System.Security.Cryptography.RSA";
// Token: 0x040012B3 RID: 4787
private const string nameRSAc = "System.Security.Cryptography.AsymmetricAlgorithm";
// Token: 0x040012B4 RID: 4788
private const string nameDSAa = "DSA";
// Token: 0x040012B5 RID: 4789
private const string nameDSAb = "System.Security.Cryptography.DSA";
// Token: 0x040012B6 RID: 4790
private const string nameDESa = "DES";
// Token: 0x040012B7 RID: 4791
private const string nameDESb = "System.Security.Cryptography.DES";
// Token: 0x040012B8 RID: 4792
private const string name3DESa = "3DES";
// Token: 0x040012B9 RID: 4793
private const string name3DESb = "TripleDES";
// Token: 0x040012BA RID: 4794
private const string name3DESc = "Triple DES";
// Token: 0x040012BB RID: 4795
private const string name3DESd = "System.Security.Cryptography.TripleDES";
// Token: 0x040012BC RID: 4796
private const string nameRC2a = "RC2";
// Token: 0x040012BD RID: 4797
private const string nameRC2b = "System.Security.Cryptography.RC2";
// Token: 0x040012BE RID: 4798
private const string nameAESa = "Rijndael";
// Token: 0x040012BF RID: 4799
private const string nameAESb = "System.Security.Cryptography.Rijndael";
// Token: 0x040012C0 RID: 4800
private const string nameAESc = "System.Security.Cryptography.SymmetricAlgorithm";
// Token: 0x040012C1 RID: 4801
private const string nameRNGa = "RandomNumberGenerator";
// Token: 0x040012C2 RID: 4802
private const string nameRNGb = "System.Security.Cryptography.RandomNumberGenerator";
// Token: 0x040012C3 RID: 4803
private const string nameKeyHasha = "System.Security.Cryptography.KeyedHashAlgorithm";
// Token: 0x040012C4 RID: 4804
private const string nameHMACSHA1a = "HMACSHA1";
// Token: 0x040012C5 RID: 4805
private const string nameHMACSHA1b = "System.Security.Cryptography.HMACSHA1";
// Token: 0x040012C6 RID: 4806
private const string nameMAC3DESa = "MACTripleDES";
// Token: 0x040012C7 RID: 4807
private const string nameMAC3DESb = "System.Security.Cryptography.MACTripleDES";
// Token: 0x040012C8 RID: 4808
private const string name3DESKeyWrap = "TripleDESKeyWrap";
// Token: 0x040012C9 RID: 4809
private const string nameRIPEMD160a = "RIPEMD160";
// Token: 0x040012CA RID: 4810
private const string nameRIPEMD160b = "RIPEMD-160";
// Token: 0x040012CB RID: 4811
private const string nameRIPEMD160c = "System.Security.Cryptography.RIPEMD160";
// Token: 0x040012CC RID: 4812
private const string nameHMACa = "HMAC";
// Token: 0x040012CD RID: 4813
private const string nameHMACb = "System.Security.Cryptography.HMAC";
// Token: 0x040012CE RID: 4814
private const string nameHMACMD5a = "HMACMD5";
// Token: 0x040012CF RID: 4815
private const string nameHMACMD5b = "System.Security.Cryptography.HMACMD5";
// Token: 0x040012D0 RID: 4816
private const string nameHMACRIPEMD160a = "HMACRIPEMD160";
// Token: 0x040012D1 RID: 4817
private const string nameHMACRIPEMD160b = "System.Security.Cryptography.HMACRIPEMD160";
// Token: 0x040012D2 RID: 4818
private const string nameHMACSHA256a = "HMACSHA256";
// Token: 0x040012D3 RID: 4819
private const string nameHMACSHA256b = "System.Security.Cryptography.HMACSHA256";
// Token: 0x040012D4 RID: 4820
private const string nameHMACSHA384a = "HMACSHA384";
// Token: 0x040012D5 RID: 4821
private const string nameHMACSHA384b = "System.Security.Cryptography.HMACSHA384";
// Token: 0x040012D6 RID: 4822
private const string nameHMACSHA512a = "HMACSHA512";
// Token: 0x040012D7 RID: 4823
private const string nameHMACSHA512b = "System.Security.Cryptography.HMACSHA512";
// Token: 0x040012D8 RID: 4824
private const string urlXmlDsig = "http://www.w3.org/2000/09/xmldsig#";
// Token: 0x040012D9 RID: 4825
private const string urlDSASHA1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1";
// Token: 0x040012DA RID: 4826
private const string urlRSASHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
// Token: 0x040012DB RID: 4827
private const string urlSHA1 = "http://www.w3.org/2000/09/xmldsig#sha1";
// Token: 0x040012DC RID: 4828
private const string urlC14N = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
// Token: 0x040012DD RID: 4829
private const string urlC14NWithComments = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";
// Token: 0x040012DE RID: 4830
private const string urlBase64 = "http://www.w3.org/2000/09/xmldsig#base64";
// Token: 0x040012DF RID: 4831
private const string urlXPath = "http://www.w3.org/TR/1999/REC-xpath-19991116";
// Token: 0x040012E0 RID: 4832
private const string urlXslt = "http://www.w3.org/TR/1999/REC-xslt-19991116";
// Token: 0x040012E1 RID: 4833
private const string urlEnveloped = "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
// Token: 0x040012E2 RID: 4834
private const string urlXmlDecryption = "http://www.w3.org/2002/07/decrypt#XML";
// Token: 0x040012E3 RID: 4835
private const string urlExcC14NWithComments = "http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
// Token: 0x040012E4 RID: 4836
private const string urlExcC14N = "http://www.w3.org/2001/10/xml-exc-c14n#";
// Token: 0x040012E5 RID: 4837
private const string urlSHA256 = "http://www.w3.org/2001/04/xmlenc#sha256";
// Token: 0x040012E6 RID: 4838
private const string urlSHA512 = "http://www.w3.org/2001/04/xmlenc#sha512";
// Token: 0x040012E7 RID: 4839
private const string urlHMACSHA256 = "http://www.w3.org/2001/04/xmldsig-more#hmac-sha256";
// Token: 0x040012E8 RID: 4840
private const string urlHMACSHA384 = "http://www.w3.org/2001/04/xmldsig-more#hmac-sha384";
// Token: 0x040012E9 RID: 4841
private const string urlHMACSHA512 = "http://www.w3.org/2001/04/xmldsig-more#hmac-sha512";
// Token: 0x040012EA RID: 4842
private const string urlHMACRIPEMD160 = "http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160";
// Token: 0x040012EB RID: 4843
private const string urlX509Data = "http://www.w3.org/2000/09/xmldsig# X509Data";
// Token: 0x040012EC RID: 4844
private const string urlKeyName = "http://www.w3.org/2000/09/xmldsig# KeyName";
// Token: 0x040012ED RID: 4845
private const string urlKeyValueDSA = "http://www.w3.org/2000/09/xmldsig# KeyValue/DSAKeyValue";
// Token: 0x040012EE RID: 4846
private const string urlKeyValueRSA = "http://www.w3.org/2000/09/xmldsig# KeyValue/RSAKeyValue";
// Token: 0x040012EF RID: 4847
private const string urlRetrievalMethod = "http://www.w3.org/2000/09/xmldsig# RetrievalMethod";
// Token: 0x040012F0 RID: 4848
private const string oidX509SubjectKeyIdentifier = "2.5.29.14";
// Token: 0x040012F1 RID: 4849
private const string oidX509KeyUsage = "2.5.29.15";
// Token: 0x040012F2 RID: 4850
private const string oidX509BasicConstraints = "2.5.29.19";
// Token: 0x040012F3 RID: 4851
private const string oidX509EnhancedKeyUsage = "2.5.29.37";
// Token: 0x040012F4 RID: 4852
private const string nameX509SubjectKeyIdentifier = "System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierExtension, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
// Token: 0x040012F5 RID: 4853
private const string nameX509KeyUsage = "System.Security.Cryptography.X509Certificates.X509KeyUsageExtension, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
// Token: 0x040012F6 RID: 4854
private const string nameX509BasicConstraints = "System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
// Token: 0x040012F7 RID: 4855
private const string nameX509EnhancedKeyUsage = "System.Security.Cryptography.X509Certificates.X509EnhancedKeyUsageExtension, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
// Token: 0x040012F8 RID: 4856
private const string nameX509Chain = "X509Chain";
// Token: 0x040012F9 RID: 4857
private const string defaultX509Chain = "System.Security.Cryptography.X509Certificates.X509Chain, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
// Token: 0x040012FA RID: 4858
private static object lockObject = new object();
// Token: 0x040012FB RID: 4859
private static Hashtable algorithms;
// Token: 0x040012FC RID: 4860
private static Hashtable oid;
// Token: 0x020004EE RID: 1262
private class CryptoHandler : SmallXmlParser.IContentHandler
{
// Token: 0x06002EB3 RID: 11955 RVA: 0x00095D1C File Offset: 0x00093F1C
public CryptoHandler(Hashtable algorithms, Hashtable oid)
{
this.algorithms = algorithms;
this.oid = oid;
this.names = new Hashtable();
this.classnames = new Hashtable();
}
// Token: 0x06002EB4 RID: 11956 RVA: 0x00095D54 File Offset: 0x00093F54
public void OnStartParsing(SmallXmlParser parser)
{
}
// Token: 0x06002EB5 RID: 11957 RVA: 0x00095D58 File Offset: 0x00093F58
public void OnEndParsing(SmallXmlParser parser)
{
foreach (object obj in this.names)
{
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
try
{
this.algorithms.Add(dictionaryEntry.Key, this.classnames[dictionaryEntry.Value]);
}
catch
{
}
}
this.names.Clear();
this.classnames.Clear();
}
// Token: 0x06002EB6 RID: 11958 RVA: 0x00095E20 File Offset: 0x00094020
private string Get(SmallXmlParser.IAttrList attrs, string name)
{
for (int i = 0; i < attrs.Names.Length; i++)
{
if (attrs.Names[i] == name)
{
return attrs.Values[i];
}
}
return string.Empty;
}
// Token: 0x06002EB7 RID: 11959 RVA: 0x00095E68 File Offset: 0x00094068
public void OnStartElement(string name, SmallXmlParser.IAttrList attrs)
{
switch (this.level)
{
case 0:
if (name == "configuration")
{
this.level++;
}
break;
case 1:
if (name == "mscorlib")
{
this.level++;
}
break;
case 2:
if (name == "cryptographySettings")
{
this.level++;
}
break;
case 3:
if (name == "oidMap")
{
this.level++;
}
else if (name == "cryptoNameMapping")
{
this.level++;
}
break;
case 4:
if (name == "oidEntry")
{
this.oid.Add(this.Get(attrs, "name"), this.Get(attrs, "OID"));
}
else if (name == "nameEntry")
{
this.names.Add(this.Get(attrs, "name"), this.Get(attrs, "class"));
}
else if (name == "cryptoClasses")
{
this.level++;
}
break;
case 5:
if (name == "cryptoClass")
{
this.classnames.Add(attrs.Names[0], attrs.Values[0]);
}
break;
}
}
// Token: 0x06002EB8 RID: 11960 RVA: 0x00096014 File Offset: 0x00094214
public void OnEndElement(string name)
{
switch (this.level)
{
case 1:
if (name == "configuration")
{
this.level--;
}
break;
case 2:
if (name == "mscorlib")
{
this.level--;
}
break;
case 3:
if (name == "cryptographySettings")
{
this.level--;
}
break;
case 4:
if (name == "oidMap" || name == "cryptoNameMapping")
{
this.level--;
}
break;
case 5:
if (name == "cryptoClasses")
{
this.level--;
}
break;
}
}
// Token: 0x06002EB9 RID: 11961 RVA: 0x00096108 File Offset: 0x00094308
public void OnProcessingInstruction(string name, string text)
{
}
// Token: 0x06002EBA RID: 11962 RVA: 0x0009610C File Offset: 0x0009430C
public void OnChars(string text)
{
}
// Token: 0x06002EBB RID: 11963 RVA: 0x00096110 File Offset: 0x00094310
public void OnIgnorableWhitespace(string text)
{
}
// Token: 0x040012FD RID: 4861
private Hashtable algorithms;
// Token: 0x040012FE RID: 4862
private Hashtable oid;
// Token: 0x040012FF RID: 4863
private Hashtable names;
// Token: 0x04001300 RID: 4864
private Hashtable classnames;
// Token: 0x04001301 RID: 4865
private int level;
}
}
}
@@ -0,0 +1,465 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Defines a stream that links data streams to cryptographic transformations.</summary>
// Token: 0x020004EF RID: 1263
[ComVisible(true)]
public class CryptoStream : Stream
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptoStream" /> class with a target data stream, the transformation to use, and the mode of the stream.</summary>
/// <param name="stream">The stream on which to perform the cryptographic transformation. </param>
/// <param name="transform">The cryptographic transformation that is to be performed on the stream. </param>
/// <param name="mode">One of the <see cref="T:System.Security.Cryptography.CryptoStreamMode" /> values. </param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="stream" /> is not readable.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="stream" /> is not writable.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="stream" /> is invalid.</exception>
// Token: 0x06002EBC RID: 11964 RVA: 0x00096114 File Offset: 0x00094314
public CryptoStream(Stream stream, ICryptoTransform transform, CryptoStreamMode mode)
{
if (mode == CryptoStreamMode.Read && !stream.CanRead)
{
throw new ArgumentException(Locale.GetText("Can't read on stream"));
}
if (mode == CryptoStreamMode.Write && !stream.CanWrite)
{
throw new ArgumentException(Locale.GetText("Can't write on stream"));
}
this._stream = stream;
this._transform = transform;
this._mode = mode;
this._disposed = false;
if (transform != null)
{
if (mode == CryptoStreamMode.Read)
{
this._currentBlock = new byte[transform.InputBlockSize];
this._workingBlock = new byte[transform.InputBlockSize];
}
else if (mode == CryptoStreamMode.Write)
{
this._currentBlock = new byte[transform.OutputBlockSize];
this._workingBlock = new byte[transform.OutputBlockSize];
}
}
}
// Token: 0x06002EBD RID: 11965 RVA: 0x000961E4 File Offset: 0x000943E4
~CryptoStream()
{
this.Dispose(false);
}
/// <summary>Gets a value indicating whether the current <see cref="T:System.Security.Cryptography.CryptoStream" /> is readable.</summary>
/// <returns>true if the current stream is readable; otherwise, false.</returns>
// Token: 0x17000935 RID: 2357
// (get) Token: 0x06002EBE RID: 11966 RVA: 0x00096220 File Offset: 0x00094420
public override bool CanRead
{
get
{
return this._mode == CryptoStreamMode.Read;
}
}
/// <summary>Gets a value indicating whether you can seek within the current <see cref="T:System.Security.Cryptography.CryptoStream" />.</summary>
/// <returns>Always false.</returns>
// Token: 0x17000936 RID: 2358
// (get) Token: 0x06002EBF RID: 11967 RVA: 0x0009622C File Offset: 0x0009442C
public override bool CanSeek
{
get
{
return false;
}
}
/// <summary>Gets a value indicating whether the current <see cref="T:System.Security.Cryptography.CryptoStream" /> is writable.</summary>
/// <returns>true if the current stream is writable; otherwise, false.</returns>
// Token: 0x17000937 RID: 2359
// (get) Token: 0x06002EC0 RID: 11968 RVA: 0x00096230 File Offset: 0x00094430
public override bool CanWrite
{
get
{
return this._mode == CryptoStreamMode.Write;
}
}
/// <summary>Gets the length in bytes of the stream.</summary>
/// <returns>This property is not supported.</returns>
/// <exception cref="T:System.NotSupportedException">This property is not supported. </exception>
// Token: 0x17000938 RID: 2360
// (get) Token: 0x06002EC1 RID: 11969 RVA: 0x0009623C File Offset: 0x0009443C
public override long Length
{
get
{
throw new NotSupportedException("Length");
}
}
/// <summary>Gets or sets the position within the current stream.</summary>
/// <returns>This property is not supported.</returns>
/// <exception cref="T:System.NotSupportedException">This property is not supported. </exception>
// Token: 0x17000939 RID: 2361
// (get) Token: 0x06002EC2 RID: 11970 RVA: 0x00096248 File Offset: 0x00094448
// (set) Token: 0x06002EC3 RID: 11971 RVA: 0x00096254 File Offset: 0x00094454
public override long Position
{
get
{
throw new NotSupportedException("Position");
}
set
{
throw new NotSupportedException("Position");
}
}
/// <summary>Releases all resources used by the <see cref="T:System.Security.Cryptography.CryptoStream" />.</summary>
// Token: 0x06002EC4 RID: 11972 RVA: 0x00096260 File Offset: 0x00094460
public void Clear()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.</summary>
/// <exception cref="T:System.NotSupportedException">The current stream is not writable. </exception>
// Token: 0x06002EC5 RID: 11973 RVA: 0x00096270 File Offset: 0x00094470
public override void Close()
{
if (!this._flushedFinalBlock && this._mode == CryptoStreamMode.Write)
{
this.FlushFinalBlock();
}
if (this._stream != null)
{
this._stream.Close();
}
}
/// <summary>Reads a sequence of bytes from the current <see cref="T:System.Security.Cryptography.CryptoStream" /> and advances the position within the stream by the number of bytes read.</summary>
/// <returns>The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream has been reached.</returns>
/// <param name="buffer">An array of bytes. A maximum of <paramref name="count" /> bytes are read from the current stream and stored in <paramref name="buffer" />. </param>
/// <param name="offset">The byte offset in <paramref name="buffer" /> at which to begin storing the data read from the current stream. </param>
/// <param name="count">The maximum number of bytes to be read from the current stream. </param>
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Security.Cryptography.CryptoStreamMode" /> associated with current <see cref="T:System.Security.Cryptography.CryptoStream" /> object does not match the underlying stream. For example, this exception is thrown when using <see cref="F:System.Security.Cryptography.CryptoStreamMode.Read" /> with an underlying stream that is write only. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="offset" /> parameter is less than zero.-or- The <paramref name="count" /> parameter is less than zero. </exception>
/// <exception cref="T:System.ArgumentException">Thesum of the <paramref name="count" /> and <paramref name="offset" /> parameters is longer than the length of the buffer. </exception>
// Token: 0x06002EC6 RID: 11974 RVA: 0x000962A8 File Offset: 0x000944A8
public override int Read([In] [Out] byte[] buffer, int offset, int count)
{
if (this._mode != CryptoStreamMode.Read)
{
throw new NotSupportedException(Locale.GetText("not in Read mode"));
}
if (offset < 0)
{
throw new ArgumentOutOfRangeException("offset", Locale.GetText("negative"));
}
if (count < 0)
{
throw new ArgumentOutOfRangeException("count", Locale.GetText("negative"));
}
if (offset > buffer.Length - count)
{
throw new ArgumentException("(offset+count)", Locale.GetText("buffer overflow"));
}
if (this._workingBlock == null)
{
return 0;
}
int num = 0;
if (count == 0 || (this._transformedPos == this._transformedCount && this._endOfStream))
{
return num;
}
if (this._waitingBlock == null)
{
this._transformedBlock = new byte[this._transform.OutputBlockSize << 2];
this._transformedPos = 0;
this._transformedCount = 0;
this._waitingBlock = new byte[this._transform.InputBlockSize];
this._waitingCount = this._stream.Read(this._waitingBlock, 0, this._waitingBlock.Length);
}
while (count > 0)
{
int num2 = this._transformedCount - this._transformedPos;
if (num2 < this._transform.InputBlockSize)
{
int num3 = 0;
this._workingCount = this._stream.Read(this._workingBlock, 0, this._transform.InputBlockSize);
this._endOfStream = this._workingCount < this._transform.InputBlockSize;
if (!this._endOfStream)
{
num3 = this._transform.TransformBlock(this._waitingBlock, 0, this._waitingBlock.Length, this._transformedBlock, this._transformedCount);
Buffer.BlockCopy(this._workingBlock, 0, this._waitingBlock, 0, this._workingCount);
this._waitingCount = this._workingCount;
}
else
{
if (this._workingCount > 0)
{
num3 = this._transform.TransformBlock(this._waitingBlock, 0, this._waitingBlock.Length, this._transformedBlock, this._transformedCount);
Buffer.BlockCopy(this._workingBlock, 0, this._waitingBlock, 0, this._workingCount);
this._waitingCount = this._workingCount;
num2 += num3;
this._transformedCount += num3;
}
if (!this._flushedFinalBlock)
{
byte[] array = this._transform.TransformFinalBlock(this._waitingBlock, 0, this._waitingCount);
num3 = array.Length;
Buffer.BlockCopy(array, 0, this._transformedBlock, this._transformedCount, array.Length);
Array.Clear(array, 0, array.Length);
this._flushedFinalBlock = true;
}
}
num2 += num3;
this._transformedCount += num3;
}
if (this._transformedPos > this._transform.OutputBlockSize)
{
Buffer.BlockCopy(this._transformedBlock, this._transformedPos, this._transformedBlock, 0, num2);
this._transformedCount -= this._transformedPos;
this._transformedPos = 0;
}
num2 = ((count >= num2) ? num2 : count);
if (num2 > 0)
{
Buffer.BlockCopy(this._transformedBlock, this._transformedPos, buffer, offset, num2);
this._transformedPos += num2;
num += num2;
offset += num2;
count -= num2;
}
if ((num2 != this._transform.InputBlockSize && this._waitingCount != this._transform.InputBlockSize) || this._endOfStream)
{
count = 0;
}
}
return num;
}
/// <summary>Writes a sequence of bytes to the current <see cref="T:System.Security.Cryptography.CryptoStream" /> and advances the current position within this stream by the number of bytes written.</summary>
/// <param name="buffer">An array of bytes. This method copies <paramref name="count" /> bytes from <paramref name="buffer" /> to the current stream. </param>
/// <param name="offset">The byte offset in <paramref name="buffer" /> at which to begin copying bytes to the current stream. </param>
/// <param name="count">The number of bytes to be written to the current stream. </param>
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Security.Cryptography.CryptoStreamMode" /> associated with current <see cref="T:System.Security.Cryptography.CryptoStream" /> object does not match the underlying stream. For example, this exception is thrown when using <see cref="F:System.Security.Cryptography.CryptoStreamMode.Write" /> with an underlying stream that is read only. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="offset" /> parameter is less than zero.-or- The <paramref name="count" /> parameter is less than zero. </exception>
/// <exception cref="T:System.ArgumentException">The sum of the <paramref name="count" /> and <paramref name="offset" /> parameters is longer than the length of the buffer. </exception>
// Token: 0x06002EC7 RID: 11975 RVA: 0x00096618 File Offset: 0x00094818
public override void Write(byte[] buffer, int offset, int count)
{
if (this._mode != CryptoStreamMode.Write)
{
throw new NotSupportedException(Locale.GetText("not in Write mode"));
}
if (offset < 0)
{
throw new ArgumentOutOfRangeException("offset", Locale.GetText("negative"));
}
if (count < 0)
{
throw new ArgumentOutOfRangeException("count", Locale.GetText("negative"));
}
if (offset > buffer.Length - count)
{
throw new ArgumentException("(offset+count)", Locale.GetText("buffer overflow"));
}
if (this._stream == null)
{
throw new ArgumentNullException("inner stream was diposed");
}
int num = count;
if (this._partialCount > 0 && this._partialCount != this._transform.InputBlockSize)
{
int num2 = this._transform.InputBlockSize - this._partialCount;
num2 = ((count >= num2) ? num2 : count);
Buffer.BlockCopy(buffer, offset, this._workingBlock, this._partialCount, num2);
this._partialCount += num2;
offset += num2;
count -= num2;
}
int num3 = offset;
while (count > 0)
{
if (this._partialCount == this._transform.InputBlockSize)
{
int num4 = this._transform.TransformBlock(this._workingBlock, 0, this._partialCount, this._currentBlock, 0);
this._stream.Write(this._currentBlock, 0, num4);
this._partialCount = 0;
}
if (this._transform.CanTransformMultipleBlocks)
{
int num5 = count & ~(this._transform.InputBlockSize - 1);
int num6 = count & (this._transform.InputBlockSize - 1);
int num7 = (1 + num5 / this._transform.InputBlockSize) * this._transform.OutputBlockSize;
if (this._workingBlock.Length < num7)
{
Array.Clear(this._workingBlock, 0, this._workingBlock.Length);
this._workingBlock = new byte[num7];
}
if (num5 > 0)
{
int num8 = this._transform.TransformBlock(buffer, offset, num5, this._workingBlock, 0);
this._stream.Write(this._workingBlock, 0, num8);
}
if (num6 > 0)
{
Buffer.BlockCopy(buffer, num - num6, this._workingBlock, 0, num6);
}
this._partialCount = num6;
count = 0;
}
else
{
int num9 = Math.Min(this._transform.InputBlockSize - this._partialCount, count);
Buffer.BlockCopy(buffer, num3, this._workingBlock, this._partialCount, num9);
num3 += num9;
this._partialCount += num9;
count -= num9;
}
}
}
/// <summary>Clears all buffers for this stream and causes any buffered data to be written to the underlying device.</summary>
// Token: 0x06002EC8 RID: 11976 RVA: 0x000968A8 File Offset: 0x00094AA8
public override void Flush()
{
if (this._stream != null)
{
this._stream.Flush();
}
}
/// <summary>Updates the underlying data source or repository with the current state of the buffer, then clears the buffer.</summary>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key is corrupt which can cause invalid padding to the stream. </exception>
/// <exception cref="T:System.NotSupportedException">The current stream is not writable.-or- The final block has already been transformed. </exception>
// Token: 0x06002EC9 RID: 11977 RVA: 0x000968C0 File Offset: 0x00094AC0
public void FlushFinalBlock()
{
if (this._flushedFinalBlock)
{
throw new NotSupportedException(Locale.GetText("This method cannot be called twice."));
}
if (this._disposed)
{
throw new NotSupportedException(Locale.GetText("CryptoStream was disposed."));
}
if (this._mode != CryptoStreamMode.Write)
{
return;
}
this._flushedFinalBlock = true;
byte[] array = this._transform.TransformFinalBlock(this._workingBlock, 0, this._partialCount);
if (this._stream != null)
{
this._stream.Write(array, 0, array.Length);
if (this._stream is CryptoStream)
{
(this._stream as CryptoStream).FlushFinalBlock();
}
this._stream.Flush();
}
Array.Clear(array, 0, array.Length);
}
/// <summary>Sets the position within the current stream.</summary>
/// <returns>This method is not supported.</returns>
/// <param name="offset">A byte offset relative to the <paramref name="origin" /> parameter. </param>
/// <param name="origin">A <see cref="T:System.IO.SeekOrigin" /> object indicating the reference point used to obtain the new position. </param>
/// <exception cref="T:System.NotSupportedException">This method is not supported. </exception>
// Token: 0x06002ECA RID: 11978 RVA: 0x00096980 File Offset: 0x00094B80
public override long Seek(long offset, SeekOrigin origin)
{
throw new NotSupportedException("Seek");
}
/// <summary>Sets the length of the current stream.</summary>
/// <param name="value">The desired length of the current stream in bytes. </param>
/// <exception cref="T:System.NotSupportedException">This property exists only to support inheritance from <see cref="T:System.IO.Stream" />, and cannot be used.</exception>
// Token: 0x06002ECB RID: 11979 RVA: 0x0009698C File Offset: 0x00094B8C
public override void SetLength(long value)
{
throw new NotSupportedException("SetLength");
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.CryptoStream" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x06002ECC RID: 11980 RVA: 0x00096998 File Offset: 0x00094B98
protected override void Dispose(bool disposing)
{
if (!this._disposed)
{
this._disposed = true;
if (this._workingBlock != null)
{
Array.Clear(this._workingBlock, 0, this._workingBlock.Length);
}
if (this._currentBlock != null)
{
Array.Clear(this._currentBlock, 0, this._currentBlock.Length);
}
if (disposing)
{
this._stream = null;
this._workingBlock = null;
this._currentBlock = null;
}
}
}
// Token: 0x04001302 RID: 4866
private Stream _stream;
// Token: 0x04001303 RID: 4867
private ICryptoTransform _transform;
// Token: 0x04001304 RID: 4868
private CryptoStreamMode _mode;
// Token: 0x04001305 RID: 4869
private byte[] _currentBlock;
// Token: 0x04001306 RID: 4870
private bool _disposed;
// Token: 0x04001307 RID: 4871
private bool _flushedFinalBlock;
// Token: 0x04001308 RID: 4872
private int _partialCount;
// Token: 0x04001309 RID: 4873
private bool _endOfStream;
// Token: 0x0400130A RID: 4874
private byte[] _waitingBlock;
// Token: 0x0400130B RID: 4875
private int _waitingCount;
// Token: 0x0400130C RID: 4876
private byte[] _transformedBlock;
// Token: 0x0400130D RID: 4877
private int _transformedPos;
// Token: 0x0400130E RID: 4878
private int _transformedCount;
// Token: 0x0400130F RID: 4879
private byte[] _workingBlock;
// Token: 0x04001310 RID: 4880
private int _workingCount;
}
}
@@ -0,0 +1,19 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Specifies the mode of a cryptographic stream.</summary>
// Token: 0x020004F0 RID: 1264
[ComVisible(true)]
[Serializable]
public enum CryptoStreamMode
{
/// <summary>Read access to a cryptographic stream.</summary>
// Token: 0x04001312 RID: 4882
Read,
/// <summary>Write access to a cryptographic stream.</summary>
// Token: 0x04001313 RID: 4883
Write
}
}
@@ -0,0 +1,67 @@
using System;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System.Security.Cryptography
{
/// <summary>The exception that is thrown when an error occurs during a cryptographic operation.</summary>
// Token: 0x020004F1 RID: 1265
[ComVisible(true)]
[Serializable]
public class CryptographicException : SystemException, _Exception
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicException" /> class with default properties.</summary>
// Token: 0x06002ECD RID: 11981 RVA: 0x00096A10 File Offset: 0x00094C10
public CryptographicException()
: base(Locale.GetText("Error occured during a cryptographic operation."))
{
base.HResult = -2146233296;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicException" /> class with the specified HRESULT error code.</summary>
/// <param name="hr">The HRESULT error code. </param>
// Token: 0x06002ECE RID: 11982 RVA: 0x00096A30 File Offset: 0x00094C30
public CryptographicException(int hr)
{
base.HResult = hr;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicException" /> class with a specified error message.</summary>
/// <param name="message">The error message that explains the reason for the exception. </param>
// Token: 0x06002ECF RID: 11983 RVA: 0x00096A40 File Offset: 0x00094C40
public CryptographicException(string message)
: base(message)
{
base.HResult = -2146233296;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.</summary>
/// <param name="message">The error message that explains the reason for the exception. </param>
/// <param name="inner">The exception that is the cause of the current exception. If the <paramref name="inner" /> parameter is not null, the current exception is raised in a catch block that handles the inner exception. </param>
// Token: 0x06002ED0 RID: 11984 RVA: 0x00096A54 File Offset: 0x00094C54
public CryptographicException(string message, Exception inner)
: base(message, inner)
{
base.HResult = -2146233296;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicException" /> class with a specified error message in the specified format.</summary>
/// <param name="format">The format used to output the error message. </param>
/// <param name="insert">The error message that explains the reason for the exception. </param>
// Token: 0x06002ED1 RID: 11985 RVA: 0x00096A6C File Offset: 0x00094C6C
public CryptographicException(string format, string insert)
: base(string.Format(format, insert))
{
base.HResult = -2146233296;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicException" /> class with serialized data.</summary>
/// <param name="info">The object that holds the serialized object data. </param>
/// <param name="context">The contextual information about the source or destination. </param>
// Token: 0x06002ED2 RID: 11986 RVA: 0x00096A88 File Offset: 0x00094C88
protected CryptographicException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
@@ -0,0 +1,59 @@
using System;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
namespace System.Security.Cryptography
{
/// <summary>The exception that is thrown when an unexpected operation occurs during a cryptographic operation.</summary>
// Token: 0x020004F2 RID: 1266
[ComVisible(true)]
[Serializable]
public class CryptographicUnexpectedOperationException : CryptographicException
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException" /> class with default properties.</summary>
// Token: 0x06002ED3 RID: 11987 RVA: 0x00096A94 File Offset: 0x00094C94
public CryptographicUnexpectedOperationException()
: base(Locale.GetText("Unexpected error occured during a cryptographic operation."))
{
base.HResult = -2146233295;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException" /> class with a specified error message.</summary>
/// <param name="message">The error message that explains the reason for the exception. </param>
// Token: 0x06002ED4 RID: 11988 RVA: 0x00096AB4 File Offset: 0x00094CB4
public CryptographicUnexpectedOperationException(string message)
: base(message)
{
base.HResult = -2146233295;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.</summary>
/// <param name="message">The error message that explains the reason for the exception. </param>
/// <param name="inner">The exception that is the cause of the current exception. If the <paramref name="inner" /> parameter is not null, the current exception is raised in a catch block that handles the inner exception. </param>
// Token: 0x06002ED5 RID: 11989 RVA: 0x00096AC8 File Offset: 0x00094CC8
public CryptographicUnexpectedOperationException(string message, Exception inner)
: base(message, inner)
{
base.HResult = -2146233295;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException" /> class with a specified error message in the specified format.</summary>
/// <param name="format">The format used to output the error message. </param>
/// <param name="insert">The error message that explains the reason for the exception. </param>
// Token: 0x06002ED6 RID: 11990 RVA: 0x00096AE0 File Offset: 0x00094CE0
public CryptographicUnexpectedOperationException(string format, string insert)
: base(string.Format(format, insert))
{
base.HResult = -2146233295;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException" /> class with serialized data.</summary>
/// <param name="info">The object that holds the serialized object data. </param>
/// <param name="context">The contextual information about the source or destination. </param>
// Token: 0x06002ED7 RID: 11991 RVA: 0x00096AFC File Offset: 0x00094CFC
protected CryptographicUnexpectedOperationException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
@@ -0,0 +1,194 @@
using System;
using System.Runtime.InteropServices;
using System.Security.AccessControl;
namespace System.Security.Cryptography
{
/// <summary>Provides additional information about a cryptographic key pair. This class cannot be inherited.</summary>
// Token: 0x020004F3 RID: 1267
[ComVisible(true)]
public sealed class CspKeyContainerInfo
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CspKeyContainerInfo" /> class using the specified parameters.</summary>
/// <param name="parameters">A <see cref="T:System.Security.Cryptography.CspParameters" /> object that provides information about the key.</param>
// Token: 0x06002ED8 RID: 11992 RVA: 0x00096B08 File Offset: 0x00094D08
public CspKeyContainerInfo(CspParameters parameters)
{
this._params = parameters;
this._random = true;
}
/// <summary>Gets a value indicating whether a key in a key container is accessible.</summary>
/// <returns>true if the key is accessible; otherwise, false.</returns>
/// <exception cref="T:System.NotSupportedException">The key type is not supported.</exception>
// Token: 0x1700093A RID: 2362
// (get) Token: 0x06002ED9 RID: 11993 RVA: 0x00096B20 File Offset: 0x00094D20
public bool Accessible
{
get
{
return true;
}
}
/// <summary>Gets a <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object that represents access rights and audit rules for a container. </summary>
/// <returns>A <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object that represents access rights and audit rules for a container.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key type is not supported.</exception>
/// <exception cref="T:System.NotSupportedException">The cryptographic service provider cannot be found.-or-The key container was not found.</exception>
// Token: 0x1700093B RID: 2363
// (get) Token: 0x06002EDA RID: 11994 RVA: 0x00096B24 File Offset: 0x00094D24
public CryptoKeySecurity CryptoKeySecurity
{
get
{
return null;
}
}
/// <summary>Gets a value indicating whether a key can be exported from a key container.</summary>
/// <returns>true if the key can be exported; otherwise, false.</returns>
/// <exception cref="T:System.NotSupportedException">The key type is not supported.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider cannot be found.-or-The key container was not found.</exception>
// Token: 0x1700093C RID: 2364
// (get) Token: 0x06002EDB RID: 11995 RVA: 0x00096B28 File Offset: 0x00094D28
public bool Exportable
{
get
{
return true;
}
}
/// <summary>Gets a value indicating whether a key is a hardware key.</summary>
/// <returns>true if the key is a hardware key; otherwise, false.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider cannot be found.</exception>
// Token: 0x1700093D RID: 2365
// (get) Token: 0x06002EDC RID: 11996 RVA: 0x00096B2C File Offset: 0x00094D2C
public bool HardwareDevice
{
get
{
return false;
}
}
/// <summary>Gets a key container name.</summary>
/// <returns>The key container name.</returns>
// Token: 0x1700093E RID: 2366
// (get) Token: 0x06002EDD RID: 11997 RVA: 0x00096B30 File Offset: 0x00094D30
public string KeyContainerName
{
get
{
return this._params.KeyContainerName;
}
}
/// <summary>Gets a value that describes whether an asymmetric key was created as a signature key or an exchange key.</summary>
/// <returns>One of the <see cref="T:System.Security.Cryptography.KeyNumber" /> values that describes whether an asymmetric key was created as a signature key or an exchange key.</returns>
// Token: 0x1700093F RID: 2367
// (get) Token: 0x06002EDE RID: 11998 RVA: 0x00096B40 File Offset: 0x00094D40
public KeyNumber KeyNumber
{
get
{
return (KeyNumber)this._params.KeyNumber;
}
}
/// <summary>Gets a value indicating whether a key is from a machine key set.</summary>
/// <returns>true if the key is from the machine key set; otherwise, false.</returns>
// Token: 0x17000940 RID: 2368
// (get) Token: 0x06002EDF RID: 11999 RVA: 0x00096B50 File Offset: 0x00094D50
public bool MachineKeyStore
{
get
{
return false;
}
}
/// <summary>Gets a value indicating whether a key pair is protected.</summary>
/// <returns>true if the key pair is protected; otherwise, false.</returns>
/// <exception cref="T:System.NotSupportedException">The key type is not supported.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider cannot be found.-or-The key container was not found.</exception>
// Token: 0x17000941 RID: 2369
// (get) Token: 0x06002EE0 RID: 12000 RVA: 0x00096B54 File Offset: 0x00094D54
public bool Protected
{
get
{
return false;
}
}
/// <summary>Gets the provider name of a key.</summary>
/// <returns>The provider name.</returns>
// Token: 0x17000942 RID: 2370
// (get) Token: 0x06002EE1 RID: 12001 RVA: 0x00096B58 File Offset: 0x00094D58
public string ProviderName
{
get
{
return this._params.ProviderName;
}
}
/// <summary>Gets the provider type of a key.</summary>
/// <returns>The provider type. The default is 1.</returns>
// Token: 0x17000943 RID: 2371
// (get) Token: 0x06002EE2 RID: 12002 RVA: 0x00096B68 File Offset: 0x00094D68
public int ProviderType
{
get
{
return this._params.ProviderType;
}
}
/// <summary>Gets a value indicating whether a key container was randomly generated by a managed cryptography class.</summary>
/// <returns>true if the key container was randomly generated; otherwise, false.</returns>
// Token: 0x17000944 RID: 2372
// (get) Token: 0x06002EE3 RID: 12003 RVA: 0x00096B78 File Offset: 0x00094D78
public bool RandomlyGenerated
{
get
{
return this._random;
}
}
/// <summary>Gets a value indicating whether a key can be removed from a key container.</summary>
/// <returns>true if the key is removable; otherwise, false.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) was not found.</exception>
// Token: 0x17000945 RID: 2373
// (get) Token: 0x06002EE4 RID: 12004 RVA: 0x00096B80 File Offset: 0x00094D80
public bool Removable
{
get
{
return false;
}
}
/// <summary>Gets a unique key container name.</summary>
/// <returns>The unique key container name.</returns>
/// <exception cref="T:System.NotSupportedException">The key type is not supported.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider cannot be found.-or-The key container was not found.</exception>
// Token: 0x17000946 RID: 2374
// (get) Token: 0x06002EE5 RID: 12005 RVA: 0x00096B84 File Offset: 0x00094D84
public string UniqueKeyContainerName
{
get
{
return this._params.ProviderName + "\\" + this._params.KeyContainerName;
}
}
// Token: 0x04001314 RID: 4884
private CspParameters _params;
// Token: 0x04001315 RID: 4885
internal bool _random;
}
}
@@ -0,0 +1,177 @@
using System;
using System.Runtime.InteropServices;
using System.Security.AccessControl;
namespace System.Security.Cryptography
{
/// <summary>Contains parameters that are passed to the cryptographic service provider (CSP) that performs cryptographic computations. This class cannot be inherited.</summary>
// Token: 0x020004F4 RID: 1268
[ComVisible(true)]
public sealed class CspParameters
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CspParameters" /> class.</summary>
// Token: 0x06002EE6 RID: 12006 RVA: 0x00096BB4 File Offset: 0x00094DB4
public CspParameters()
: this(1)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CspParameters" /> class with the specified provider type code.</summary>
/// <param name="dwTypeIn">A provider type code that specifies the kind of provider to create. </param>
// Token: 0x06002EE7 RID: 12007 RVA: 0x00096BC0 File Offset: 0x00094DC0
public CspParameters(int dwTypeIn)
: this(dwTypeIn, null)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CspParameters" /> class with the specified provider type code and name.</summary>
/// <param name="dwTypeIn">A provider type code that specifies the kind of provider to create.</param>
/// <param name="strProviderNameIn">A provider name. </param>
// Token: 0x06002EE8 RID: 12008 RVA: 0x00096BCC File Offset: 0x00094DCC
public CspParameters(int dwTypeIn, string strProviderNameIn)
: this(dwTypeIn, null, null)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CspParameters" /> class with the specified provider type code and name, and the specified container name.</summary>
/// <param name="dwTypeIn">The provider type code that specifies the kind of provider to create.</param>
/// <param name="strProviderNameIn">A provider name. </param>
/// <param name="strContainerNameIn">A container name. </param>
// Token: 0x06002EE9 RID: 12009 RVA: 0x00096BD8 File Offset: 0x00094DD8
public CspParameters(int dwTypeIn, string strProviderNameIn, string strContainerNameIn)
{
this.ProviderType = dwTypeIn;
this.ProviderName = strProviderNameIn;
this.KeyContainerName = strContainerNameIn;
this.KeyNumber = -1;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CspParameters" /> class using a provider type, a provider name, a container name, access information, and a handle to an unmanaged smart card password dialog. </summary>
/// <param name="providerType">The provider type code that specifies the kind of provider to create.</param>
/// <param name="providerName">A provider name. </param>
/// <param name="keyContainerName">A container name. </param>
/// <param name="cryptoKeySecurity">A <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object that represents access rights and audit rules for the container.</param>
/// <param name="parentWindowHandle">A handle to the parent window for a smart card password dialog.</param>
// Token: 0x06002EEA RID: 12010 RVA: 0x00096C08 File Offset: 0x00094E08
public CspParameters(int providerType, string providerName, string keyContainerName, CryptoKeySecurity cryptoKeySecurity, IntPtr parentWindowHandle)
: this(providerType, providerName, keyContainerName)
{
if (cryptoKeySecurity != null)
{
this.CryptoKeySecurity = cryptoKeySecurity;
}
this._windowHandle = parentWindowHandle;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.CspParameters" /> class using a provider type, a provider name, a container name, access information, and a password associated with a smart card key.</summary>
/// <param name="providerType">The provider type code that specifies the kind of provider to create.</param>
/// <param name="providerName">A provider name. </param>
/// <param name="keyContainerName">A container name. </param>
/// <param name="cryptoKeySecurity">A <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object that represents access rights and audit rules for a container. </param>
/// <param name="keyPassword">A password associated with a smart card key.</param>
// Token: 0x06002EEB RID: 12011 RVA: 0x00096C38 File Offset: 0x00094E38
public CspParameters(int providerType, string providerName, string keyContainerName, CryptoKeySecurity cryptoKeySecurity, SecureString keyPassword)
: this(providerType, providerName, keyContainerName)
{
if (cryptoKeySecurity != null)
{
this.CryptoKeySecurity = cryptoKeySecurity;
}
this._password = keyPassword;
}
/// <summary>Represents the flags for <see cref="T:System.Security.Cryptography.CspParameters" /> that modify the behavior of the cryptographic service provider (CSP).</summary>
/// <returns>An enumeration value, or a bitwise combination of enumeration values.</returns>
// Token: 0x17000947 RID: 2375
// (get) Token: 0x06002EEC RID: 12012 RVA: 0x00096C68 File Offset: 0x00094E68
// (set) Token: 0x06002EED RID: 12013 RVA: 0x00096C70 File Offset: 0x00094E70
public CspProviderFlags Flags
{
get
{
return this._Flags;
}
set
{
this._Flags = value;
}
}
/// <summary>Gets or sets a <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object that represents access rights and audit rules for a container. </summary>
/// <returns>A <see cref="T:System.Security.AccessControl.CryptoKeySecurity" /> object that represents access rights and audit rules for a container.</returns>
// Token: 0x17000948 RID: 2376
// (get) Token: 0x06002EEE RID: 12014 RVA: 0x00096C7C File Offset: 0x00094E7C
// (set) Token: 0x06002EEF RID: 12015 RVA: 0x00096C84 File Offset: 0x00094E84
[MonoTODO("access control isn't implemented")]
public CryptoKeySecurity CryptoKeySecurity
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
/// <summary>Gets or sets a password associated with a smart card key. </summary>
/// <returns>A password associated with a smart card key.</returns>
// Token: 0x17000949 RID: 2377
// (get) Token: 0x06002EF0 RID: 12016 RVA: 0x00096C8C File Offset: 0x00094E8C
// (set) Token: 0x06002EF1 RID: 12017 RVA: 0x00096C94 File Offset: 0x00094E94
public SecureString KeyPassword
{
get
{
return this._password;
}
set
{
this._password = value;
}
}
/// <summary>Gets or sets a handle to the unmanaged parent window for a smart card password dialog.</summary>
/// <returns>A handle to the parent window for a smart card password dialog.</returns>
// Token: 0x1700094A RID: 2378
// (get) Token: 0x06002EF2 RID: 12018 RVA: 0x00096CA0 File Offset: 0x00094EA0
// (set) Token: 0x06002EF3 RID: 12019 RVA: 0x00096CA8 File Offset: 0x00094EA8
public IntPtr ParentWindowHandle
{
get
{
return this._windowHandle;
}
set
{
this._windowHandle = value;
}
}
// Token: 0x04001316 RID: 4886
private CspProviderFlags _Flags;
/// <summary>Represents the key container name for <see cref="T:System.Security.Cryptography.CspParameters" />.</summary>
// Token: 0x04001317 RID: 4887
public string KeyContainerName;
/// <summary>Specifies whether an asymmetric key is created as a signature key or an exchange key.</summary>
// Token: 0x04001318 RID: 4888
public int KeyNumber;
/// <summary>Represents the provider name for <see cref="T:System.Security.Cryptography.CspParameters" />.</summary>
// Token: 0x04001319 RID: 4889
public string ProviderName;
/// <summary>Represents the provider type code for <see cref="T:System.Security.Cryptography.CspParameters" />.</summary>
// Token: 0x0400131A RID: 4890
public int ProviderType;
// Token: 0x0400131B RID: 4891
private SecureString _password;
// Token: 0x0400131C RID: 4892
private IntPtr _windowHandle;
}
}
@@ -0,0 +1,38 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Specifies flags that modify the behavior of the cryptographic service providers (CSP).</summary>
// Token: 0x020004F5 RID: 1269
[Flags]
[ComVisible(true)]
[Serializable]
public enum CspProviderFlags
{
/// <summary>Use key information from the computer's key store.</summary>
// Token: 0x0400131E RID: 4894
UseMachineKeyStore = 1,
/// <summary>Use key information from the default key container.</summary>
// Token: 0x0400131F RID: 4895
UseDefaultKeyContainer = 2,
/// <summary>Use key information from the current key.</summary>
// Token: 0x04001320 RID: 4896
UseExistingKey = 8,
/// <summary>Don't specify any settings.</summary>
// Token: 0x04001321 RID: 4897
NoFlags = 0,
/// <summary>Prevent the CSP from displaying any user interface (UI) for this context.</summary>
// Token: 0x04001322 RID: 4898
NoPrompt = 64,
/// <summary>Allow a key to be exported for archival or recovery.</summary>
// Token: 0x04001323 RID: 4899
UseArchivableKey = 16,
/// <summary>Use key information that can not be exported.</summary>
// Token: 0x04001324 RID: 4900
UseNonExportableKey = 4,
/// <summary>Notify the user through a dialog box or another method when certain actions are attempting to use a key. This flag is not compatible with the <see cref="F:System.Security.Cryptography.CspProviderFlags.NoPrompt" /> flag.</summary>
// Token: 0x04001325 RID: 4901
UseUserProtectedKey = 32
}
}
@@ -0,0 +1,195 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Represents the base class for the Data Encryption Standard (DES) algorithm from which all <see cref="T:System.Security.Cryptography.DES" /> implementations must derive.</summary>
// Token: 0x020004F6 RID: 1270
[ComVisible(true)]
public abstract class DES : SymmetricAlgorithm
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DES" /> class.</summary>
// Token: 0x06002EF4 RID: 12020 RVA: 0x00096CB4 File Offset: 0x00094EB4
protected DES()
{
this.KeySizeValue = 64;
this.BlockSizeValue = 64;
this.FeedbackSizeValue = 8;
this.LegalKeySizesValue = new KeySizes[1];
this.LegalKeySizesValue[0] = new KeySizes(64, 64, 0);
this.LegalBlockSizesValue = new KeySizes[1];
this.LegalBlockSizesValue[0] = new KeySizes(64, 64, 0);
}
/// <summary>Creates an instance of a cryptographic object to perform the Data Encryption Standard (<see cref="T:System.Security.Cryptography.DES" />) algorithm.</summary>
/// <returns>A cryptographic object.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x06002EF6 RID: 12022 RVA: 0x00096D58 File Offset: 0x00094F58
public new static DES Create()
{
return DES.Create("System.Security.Cryptography.DES");
}
/// <summary>Creates an instance of a cryptographic object to perform the specified implementation of the Data Encryption Standard (<see cref="T:System.Security.Cryptography.DES" />) algorithm.</summary>
/// <returns>A cryptographic object.</returns>
/// <param name="algName">The name of the specific implementation of <see cref="T:System.Security.Cryptography.DES" /> to use. </param>
// Token: 0x06002EF7 RID: 12023 RVA: 0x00096D64 File Offset: 0x00094F64
public new static DES Create(string algName)
{
return (DES)CryptoConfig.CreateFromName(algName);
}
/// <summary>Determines whether the specified key is weak.</summary>
/// <returns>true if the key is weak; otherwise, false.</returns>
/// <param name="rgbKey">The secret key to test for weakness. </param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The size of the <paramref name="rgbKey" /> parameter is not valid. </exception>
// Token: 0x06002EF8 RID: 12024 RVA: 0x00096D74 File Offset: 0x00094F74
public static bool IsWeakKey(byte[] rgbKey)
{
if (rgbKey == null)
{
throw new CryptographicException(Locale.GetText("Null Key"));
}
if (rgbKey.Length != 8)
{
throw new CryptographicException(Locale.GetText("Wrong Key Length"));
}
for (int i = 0; i < rgbKey.Length; i++)
{
int num = (int)(rgbKey[i] | 17);
if (num != 17 && num != 31 && num != 241 && num != 255)
{
return false;
}
}
for (int j = 0; j < DES.weakKeys.Length >> 3; j++)
{
int k;
for (k = 0; k < rgbKey.Length; k++)
{
if ((rgbKey[k] ^ DES.weakKeys[j, k]) > 1)
{
break;
}
}
if (k == 8)
{
return true;
}
}
return false;
}
/// <summary>Determines whether the specified key is semi-weak.</summary>
/// <returns>true if the key is semi-weak; otherwise, false.</returns>
/// <param name="rgbKey">The secret key to test for semi-weakness. </param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The size of the <paramref name="rgbKey" /> parameter is not valid. </exception>
// Token: 0x06002EF9 RID: 12025 RVA: 0x00096E54 File Offset: 0x00095054
public static bool IsSemiWeakKey(byte[] rgbKey)
{
if (rgbKey == null)
{
throw new CryptographicException(Locale.GetText("Null Key"));
}
if (rgbKey.Length != 8)
{
throw new CryptographicException(Locale.GetText("Wrong Key Length"));
}
for (int i = 0; i < rgbKey.Length; i++)
{
int num = (int)(rgbKey[i] | 17);
if (num != 17 && num != 31 && num != 241 && num != 255)
{
return false;
}
}
for (int j = 0; j < DES.semiWeakKeys.Length >> 3; j++)
{
int k;
for (k = 0; k < rgbKey.Length; k++)
{
if ((rgbKey[k] ^ DES.semiWeakKeys[j, k]) > 1)
{
break;
}
}
if (k == 8)
{
return true;
}
}
return false;
}
/// <summary>Gets or sets the secret key for the Data Encryption Standard (<see cref="T:System.Security.Cryptography.DES" />) algorithm.</summary>
/// <returns>The secret key for the <see cref="T:System.Security.Cryptography.DES" /> algorithm.</returns>
/// <exception cref="T:System.ArgumentNullException">An attempt was made to set the key to null. </exception>
/// <exception cref="T:System.ArgumentException">An attempt was made to set a key whose length is not equal to <see cref="F:System.Security.Cryptography.SymmetricAlgorithm.BlockSizeValue" />. </exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">An attempt was made to set a weak key (see <see cref="M:System.Security.Cryptography.DES.IsWeakKey(System.Byte[])" />) or a semi-weak key (see <see cref="M:System.Security.Cryptography.DES.IsSemiWeakKey(System.Byte[])" />). </exception>
// Token: 0x1700094B RID: 2379
// (get) Token: 0x06002EFA RID: 12026 RVA: 0x00096F34 File Offset: 0x00095134
// (set) Token: 0x06002EFB RID: 12027 RVA: 0x00096F58 File Offset: 0x00095158
public override byte[] Key
{
get
{
if (this.KeyValue == null)
{
this.GenerateKey();
}
return (byte[])this.KeyValue.Clone();
}
set
{
if (value == null)
{
throw new ArgumentNullException("Key");
}
if (value.Length != 8)
{
throw new ArgumentException(Locale.GetText("Wrong Key Length"));
}
if (DES.IsWeakKey(value))
{
throw new CryptographicException(Locale.GetText("Weak Key"));
}
if (DES.IsSemiWeakKey(value))
{
throw new CryptographicException(Locale.GetText("Semi Weak Key"));
}
this.KeyValue = (byte[])value.Clone();
}
}
// Token: 0x04001326 RID: 4902
private const int keySizeByte = 8;
// Token: 0x04001327 RID: 4903
internal static readonly byte[,] weakKeys = new byte[,]
{
{ 1, 1, 1, 1, 1, 1, 1, 1 },
{ 31, 31, 31, 31, 15, 15, 15, 15 },
{ 225, 225, 225, 225, 241, 241, 241, 241 },
{ byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue }
};
// Token: 0x04001328 RID: 4904
internal static readonly byte[,] semiWeakKeys = new byte[,]
{
{ 0, 30, 0, 30, 0, 14, 0, 14 },
{ 0, 224, 0, 224, 0, 240, 0, 240 },
{ 0, 254, 0, 254, 0, 254, 0, 254 },
{ 30, 0, 30, 0, 14, 0, 14, 0 },
{ 30, 224, 30, 224, 14, 240, 14, 240 },
{ 30, 254, 30, 254, 14, 254, 14, 254 },
{ 224, 0, 224, 0, 240, 0, 240, 0 },
{ 224, 30, 224, 30, 240, 14, 240, 14 },
{ 224, 254, 224, 254, 240, 254, 240, 254 },
{ 254, 0, 254, 0, 254, 0, 254, 0 },
{ 254, 30, 254, 30, 254, 14, 254, 14 },
{ 254, 224, 254, 224, 254, 240, 254, 240 }
};
}
}
@@ -0,0 +1,54 @@
using System;
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// <summary>Defines a wrapper object to access the cryptographic service provider (CSP) version of the Data Encryption Standard (<see cref="T:System.Security.Cryptography.DES" />) algorithm. This class cannot be inherited.</summary>
// Token: 0x020004F8 RID: 1272
[ComVisible(true)]
public sealed class DESCryptoServiceProvider : DES
{
/// <summary>Creates a symmetric Data Encryption Standard (<see cref="T:System.Security.Cryptography.DES" />) decryptor object with the specified key (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" />) and initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />).</summary>
/// <returns>A symmetric <see cref="T:System.Security.Cryptography.DES" /> decryptor object.</returns>
/// <param name="rgbKey">The secret key to use for the symmetric algorithm. </param>
/// <param name="rgbIV">The initialization vector to use for the symmetric algorithm. </param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The value of the <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Mode" /> property is <see cref="F:System.Security.Cryptography.CipherMode.OFB" />.-or-The value of the <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Mode" />property is <see cref="F:System.Security.Cryptography.CipherMode.CFB" />, and the value of the <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.FeedbackSize" /> property is not 8.-or-An invalid key size was used.-or-The algorithm key size was not available.</exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F06 RID: 12038 RVA: 0x000977E0 File Offset: 0x000959E0
public override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV)
{
return new DESTransform(this, false, rgbKey, rgbIV);
}
/// <summary>Creates a symmetric Data Encryption Standard (<see cref="T:System.Security.Cryptography.DES" />) encryptor object with the specified key (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" />) and initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />).</summary>
/// <returns>A symmetric <see cref="T:System.Security.Cryptography.DES" /> encryptor object.</returns>
/// <param name="rgbKey">The secret key to use for the symmetric algorithm. </param>
/// <param name="rgbIV">The initialization vector to use for the symmetric algorithm. </param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The value of the <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Mode" /> property is <see cref="F:System.Security.Cryptography.CipherMode.OFB" />.-or-The value of the <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Mode" /> property is <see cref="F:System.Security.Cryptography.CipherMode.CFB" /> and the value of the <see cref="P:System.Security.Cryptography.SymmetricAlgorithm.FeedbackSize" /> property is not 8.-or-An invalid key size was used.-or-The algorithm key size was not available.</exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F07 RID: 12039 RVA: 0x000977EC File Offset: 0x000959EC
public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV)
{
return new DESTransform(this, true, rgbKey, rgbIV);
}
/// <summary>Generates a random initialization vector (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.IV" />) to use for the algorithm.</summary>
// Token: 0x06002F08 RID: 12040 RVA: 0x000977F8 File Offset: 0x000959F8
public override void GenerateIV()
{
this.IVValue = KeyBuilder.IV(DESTransform.BLOCK_BYTE_SIZE);
}
/// <summary>Generates a random key (<see cref="P:System.Security.Cryptography.SymmetricAlgorithm.Key" />) to be used for the algorithm.</summary>
// Token: 0x06002F09 RID: 12041 RVA: 0x0009780C File Offset: 0x00095A0C
public override void GenerateKey()
{
this.KeyValue = DESTransform.GetStrongKey();
}
}
}
@@ -0,0 +1,450 @@
using System;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
// Token: 0x020004F7 RID: 1271
internal class DESTransform : SymmetricTransform
{
// Token: 0x06002EFC RID: 12028 RVA: 0x00096FD8 File Offset: 0x000951D8
internal DESTransform(SymmetricAlgorithm symmAlgo, bool encryption, byte[] key, byte[] iv)
: base(symmAlgo, encryption, iv)
{
byte[] array = null;
if (key == null)
{
key = DESTransform.GetStrongKey();
array = key;
}
if (DES.IsWeakKey(key) || DES.IsSemiWeakKey(key))
{
string text = Locale.GetText("This is a known weak, or semi-weak, key.");
throw new CryptographicException(text);
}
if (array == null)
{
array = (byte[])key.Clone();
}
this.keySchedule = new byte[DESTransform.KEY_BYTE_SIZE * 16];
this.byteBuff = new byte[DESTransform.BLOCK_BYTE_SIZE];
this.dwordBuff = new uint[DESTransform.BLOCK_BYTE_SIZE / 4];
this.SetKey(array);
}
// Token: 0x06002EFE RID: 12030 RVA: 0x00097140 File Offset: 0x00095340
private uint CipherFunct(uint r, int n)
{
uint num = 0U;
byte[] array = this.keySchedule;
int num2 = n << 3;
uint num3 = (r >> 1) | (r << 31);
num |= DESTransform.spBoxes[(int)((UIntPtr)(0U + (((num3 >> 26) ^ (uint)array[num2++]) & 63U)))];
num |= DESTransform.spBoxes[(int)((UIntPtr)(64U + (((num3 >> 22) ^ (uint)array[num2++]) & 63U)))];
num |= DESTransform.spBoxes[(int)((UIntPtr)(128U + (((num3 >> 18) ^ (uint)array[num2++]) & 63U)))];
num |= DESTransform.spBoxes[(int)((UIntPtr)(192U + (((num3 >> 14) ^ (uint)array[num2++]) & 63U)))];
num |= DESTransform.spBoxes[(int)((UIntPtr)(256U + (((num3 >> 10) ^ (uint)array[num2++]) & 63U)))];
num |= DESTransform.spBoxes[(int)((UIntPtr)(320U + (((num3 >> 6) ^ (uint)array[num2++]) & 63U)))];
num |= DESTransform.spBoxes[(int)((UIntPtr)(384U + (((num3 >> 2) ^ (uint)array[num2++]) & 63U)))];
num3 = (r << 1) | (r >> 31);
return num | DESTransform.spBoxes[(int)((UIntPtr)(448U + ((num3 ^ (uint)array[num2]) & 63U)))];
}
// Token: 0x06002EFF RID: 12031 RVA: 0x00097258 File Offset: 0x00095458
internal static void Permutation(byte[] input, byte[] output, uint[] permTab, bool preSwap)
{
if (preSwap && BitConverter.IsLittleEndian)
{
DESTransform.BSwap(input);
}
int num = input[0] >> 4 << 1;
int num2 = 32 + ((int)(input[0] & 15) << 1);
uint num3 = permTab[num++] | permTab[num2++];
uint num4 = permTab[num] | permTab[num2];
int num5 = DESTransform.BLOCK_BYTE_SIZE << 1;
int i = 2;
int num6 = 1;
while (i < num5)
{
int num7 = (int)input[num6];
num = (i << 5) + (num7 >> 4 << 1);
num2 = (i + 1 << 5) + ((num7 & 15) << 1);
num3 |= permTab[num++] | permTab[num2++];
num4 |= permTab[num] | permTab[num2];
i += 2;
num6++;
}
if (preSwap || !BitConverter.IsLittleEndian)
{
output[0] = (byte)num3;
output[1] = (byte)(num3 >> 8);
output[2] = (byte)(num3 >> 16);
output[3] = (byte)(num3 >> 24);
output[4] = (byte)num4;
output[5] = (byte)(num4 >> 8);
output[6] = (byte)(num4 >> 16);
output[7] = (byte)(num4 >> 24);
}
else
{
output[0] = (byte)(num3 >> 24);
output[1] = (byte)(num3 >> 16);
output[2] = (byte)(num3 >> 8);
output[3] = (byte)num3;
output[4] = (byte)(num4 >> 24);
output[5] = (byte)(num4 >> 16);
output[6] = (byte)(num4 >> 8);
output[7] = (byte)num4;
}
}
// Token: 0x06002F00 RID: 12032 RVA: 0x00097394 File Offset: 0x00095594
private static void BSwap(byte[] byteBuff)
{
byte b = byteBuff[0];
byteBuff[0] = byteBuff[3];
byteBuff[3] = b;
b = byteBuff[1];
byteBuff[1] = byteBuff[2];
byteBuff[2] = b;
b = byteBuff[4];
byteBuff[4] = byteBuff[7];
byteBuff[7] = b;
b = byteBuff[5];
byteBuff[5] = byteBuff[6];
byteBuff[6] = b;
}
// Token: 0x06002F01 RID: 12033 RVA: 0x000973DC File Offset: 0x000955DC
internal void SetKey(byte[] key)
{
Array.Clear(this.keySchedule, 0, this.keySchedule.Length);
int num = DESTransform.PC1.Length;
byte[] array = new byte[num];
byte[] array2 = new byte[num];
int num2 = 0;
foreach (byte b in DESTransform.PC1)
{
array[num2++] = (byte)((key[b >> 3] >> (int)(7 ^ (b & 7))) & 1);
}
for (int j = 0; j < DESTransform.KEY_BYTE_SIZE * 2; j++)
{
int num3 = num >> 1;
int k;
for (k = 0; k < num3; k++)
{
int num4 = k + (int)DESTransform.leftRotTotal[j];
array2[k] = array[(num4 >= num3) ? (num4 - num3) : num4];
}
for (k = num3; k < num; k++)
{
int num5 = k + (int)DESTransform.leftRotTotal[j];
array2[k] = array[(num5 >= num) ? (num5 - num3) : num5];
}
int num6 = j * DESTransform.KEY_BYTE_SIZE;
k = 0;
foreach (byte b2 in DESTransform.PC2)
{
if (array2[(int)b2] != 0)
{
byte[] array3 = this.keySchedule;
int num7 = num6 + k / 6;
array3[num7] |= (byte)(128 >> k % 6 + 2);
}
k++;
}
}
}
// Token: 0x06002F02 RID: 12034 RVA: 0x00097560 File Offset: 0x00095760
public void ProcessBlock(byte[] input, byte[] output)
{
Buffer.BlockCopy(input, 0, this.dwordBuff, 0, DESTransform.BLOCK_BYTE_SIZE);
if (this.encrypt)
{
uint num = this.dwordBuff[0];
uint num2 = this.dwordBuff[1];
num ^= this.CipherFunct(num2, 0);
num2 ^= this.CipherFunct(num, 1);
num ^= this.CipherFunct(num2, 2);
num2 ^= this.CipherFunct(num, 3);
num ^= this.CipherFunct(num2, 4);
num2 ^= this.CipherFunct(num, 5);
num ^= this.CipherFunct(num2, 6);
num2 ^= this.CipherFunct(num, 7);
num ^= this.CipherFunct(num2, 8);
num2 ^= this.CipherFunct(num, 9);
num ^= this.CipherFunct(num2, 10);
num2 ^= this.CipherFunct(num, 11);
num ^= this.CipherFunct(num2, 12);
num2 ^= this.CipherFunct(num, 13);
num ^= this.CipherFunct(num2, 14);
num2 ^= this.CipherFunct(num, 15);
this.dwordBuff[0] = num2;
this.dwordBuff[1] = num;
}
else
{
uint num3 = this.dwordBuff[0];
uint num4 = this.dwordBuff[1];
num3 ^= this.CipherFunct(num4, 15);
num4 ^= this.CipherFunct(num3, 14);
num3 ^= this.CipherFunct(num4, 13);
num4 ^= this.CipherFunct(num3, 12);
num3 ^= this.CipherFunct(num4, 11);
num4 ^= this.CipherFunct(num3, 10);
num3 ^= this.CipherFunct(num4, 9);
num4 ^= this.CipherFunct(num3, 8);
num3 ^= this.CipherFunct(num4, 7);
num4 ^= this.CipherFunct(num3, 6);
num3 ^= this.CipherFunct(num4, 5);
num4 ^= this.CipherFunct(num3, 4);
num3 ^= this.CipherFunct(num4, 3);
num4 ^= this.CipherFunct(num3, 2);
num3 ^= this.CipherFunct(num4, 1);
num4 ^= this.CipherFunct(num3, 0);
this.dwordBuff[0] = num4;
this.dwordBuff[1] = num3;
}
Buffer.BlockCopy(this.dwordBuff, 0, output, 0, DESTransform.BLOCK_BYTE_SIZE);
}
// Token: 0x06002F03 RID: 12035 RVA: 0x0009775C File Offset: 0x0009595C
protected override void ECB(byte[] input, byte[] output)
{
DESTransform.Permutation(input, output, DESTransform.ipTab, false);
this.ProcessBlock(output, this.byteBuff);
DESTransform.Permutation(this.byteBuff, output, DESTransform.fpTab, true);
}
// Token: 0x06002F04 RID: 12036 RVA: 0x00097798 File Offset: 0x00095998
internal static byte[] GetStrongKey()
{
byte[] array = KeyBuilder.Key(DESTransform.KEY_BYTE_SIZE);
while (DES.IsWeakKey(array) || DES.IsSemiWeakKey(array))
{
array = KeyBuilder.Key(DESTransform.KEY_BYTE_SIZE);
}
return array;
}
// Token: 0x04001329 RID: 4905
internal static readonly int KEY_BIT_SIZE = 64;
// Token: 0x0400132A RID: 4906
internal static readonly int KEY_BYTE_SIZE = DESTransform.KEY_BIT_SIZE / 8;
// Token: 0x0400132B RID: 4907
internal static readonly int BLOCK_BIT_SIZE = 64;
// Token: 0x0400132C RID: 4908
internal static readonly int BLOCK_BYTE_SIZE = DESTransform.BLOCK_BIT_SIZE / 8;
// Token: 0x0400132D RID: 4909
private byte[] keySchedule;
// Token: 0x0400132E RID: 4910
private byte[] byteBuff;
// Token: 0x0400132F RID: 4911
private uint[] dwordBuff;
// Token: 0x04001330 RID: 4912
private static readonly uint[] spBoxes = new uint[]
{
8421888U, 0U, 32768U, 8421890U, 8421378U, 33282U, 2U, 32768U, 512U, 8421888U,
8421890U, 512U, 8389122U, 8421378U, 8388608U, 2U, 514U, 8389120U, 8389120U, 33280U,
33280U, 8421376U, 8421376U, 8389122U, 32770U, 8388610U, 8388610U, 32770U, 0U, 514U,
33282U, 8388608U, 32768U, 8421890U, 2U, 8421376U, 8421888U, 8388608U, 8388608U, 512U,
8421378U, 32768U, 33280U, 8388610U, 512U, 2U, 8389122U, 33282U, 8421890U, 32770U,
8421376U, 8389122U, 8388610U, 514U, 33282U, 8421888U, 514U, 8389120U, 8389120U, 0U,
32770U, 33280U, 0U, 8421378U, 1074282512U, 1073758208U, 16384U, 540688U, 524288U, 16U,
1074266128U, 1073758224U, 1073741840U, 1074282512U, 1074282496U, 1073741824U, 1073758208U, 524288U, 16U, 1074266128U,
540672U, 524304U, 1073758224U, 0U, 1073741824U, 16384U, 540688U, 1074266112U, 524304U, 1073741840U,
0U, 540672U, 16400U, 1074282496U, 1074266112U, 16400U, 0U, 540688U, 1074266128U, 524288U,
1073758224U, 1074266112U, 1074282496U, 16384U, 1074266112U, 1073758208U, 16U, 1074282512U, 540688U, 16U,
16384U, 1073741824U, 16400U, 1074282496U, 524288U, 1073741840U, 524304U, 1073758224U, 1073741840U, 524304U,
540672U, 0U, 1073758208U, 16400U, 1073741824U, 1074266128U, 1074282512U, 540672U, 260U, 67174656U,
0U, 67174404U, 67109120U, 0U, 65796U, 67109120U, 65540U, 67108868U, 67108868U, 65536U,
67174660U, 65540U, 67174400U, 260U, 67108864U, 4U, 67174656U, 256U, 65792U, 67174400U,
67174404U, 65796U, 67109124U, 65792U, 65536U, 67109124U, 4U, 67174660U, 256U, 67108864U,
67174656U, 67108864U, 65540U, 260U, 65536U, 67174656U, 67109120U, 0U, 256U, 65540U,
67174660U, 67109120U, 67108868U, 256U, 0U, 67174404U, 67109124U, 65536U, 67108864U, 67174660U,
4U, 65796U, 65792U, 67108868U, 67174400U, 67109124U, 260U, 67174400U, 65796U, 4U,
67174404U, 65792U, 2151682048U, 2147487808U, 2147487808U, 64U, 4198464U, 2151678016U, 2151677952U, 2147487744U,
0U, 4198400U, 4198400U, 2151682112U, 2147483712U, 0U, 4194368U, 2151677952U, 2147483648U, 4096U,
4194304U, 2151682048U, 64U, 4194304U, 2147487744U, 4160U, 2151678016U, 2147483648U, 4160U, 4194368U,
4096U, 4198464U, 2151682112U, 2147483712U, 4194368U, 2151677952U, 4198400U, 2151682112U, 2147483712U, 0U,
0U, 4198400U, 4160U, 4194368U, 2151678016U, 2147483648U, 2151682048U, 2147487808U, 2147487808U, 64U,
2151682112U, 2147483712U, 2147483648U, 4096U, 2151677952U, 2147487744U, 4198464U, 2151678016U, 2147487744U, 4160U,
4194304U, 2151682048U, 64U, 4194304U, 4096U, 4198464U, 128U, 17039488U, 17039360U, 553648256U,
262144U, 128U, 536870912U, 17039360U, 537133184U, 262144U, 16777344U, 537133184U, 553648256U, 553910272U,
262272U, 536870912U, 16777216U, 537133056U, 537133056U, 0U, 536871040U, 553910400U, 553910400U, 16777344U,
553910272U, 536871040U, 0U, 553648128U, 17039488U, 16777216U, 553648128U, 262272U, 262144U, 553648256U,
128U, 16777216U, 536870912U, 17039360U, 553648256U, 537133184U, 16777344U, 536870912U, 553910272U, 17039488U,
537133184U, 128U, 16777216U, 553910272U, 553910400U, 262272U, 553648128U, 553910400U, 17039360U, 0U,
537133056U, 553648128U, 262272U, 16777344U, 536871040U, 262144U, 0U, 537133056U, 17039488U, 536871040U,
268435464U, 270532608U, 8192U, 270540808U, 270532608U, 8U, 270540808U, 2097152U, 268443648U, 2105352U,
2097152U, 268435464U, 2097160U, 268443648U, 268435456U, 8200U, 0U, 2097160U, 268443656U, 8192U,
2105344U, 268443656U, 8U, 270532616U, 270532616U, 0U, 2105352U, 270540800U, 8200U, 2105344U,
270540800U, 268435456U, 268443648U, 8U, 270532616U, 2105344U, 270540808U, 2097152U, 8200U, 268435464U,
2097152U, 268443648U, 268435456U, 8200U, 268435464U, 270540808U, 2105344U, 270532608U, 2105352U, 270540800U,
0U, 270532616U, 8U, 8192U, 270532608U, 2105352U, 8192U, 2097160U, 268443656U, 0U,
270540800U, 268435456U, 2097160U, 268443656U, 1048576U, 34603009U, 33555457U, 0U, 1024U, 33555457U,
1049601U, 34604032U, 34604033U, 1048576U, 0U, 33554433U, 1U, 33554432U, 34603009U, 1025U,
33555456U, 1049601U, 1048577U, 33555456U, 33554433U, 34603008U, 34604032U, 1048577U, 34603008U, 1024U,
1025U, 34604033U, 1049600U, 1U, 33554432U, 1049600U, 33554432U, 1049600U, 1048576U, 33555457U,
33555457U, 34603009U, 34603009U, 1U, 1048577U, 33554432U, 33555456U, 1048576U, 34604032U, 1025U,
1049601U, 34604032U, 1025U, 33554433U, 34604033U, 34603008U, 1049600U, 0U, 1U, 34604033U,
0U, 1049601U, 34603008U, 1024U, 33554433U, 33555456U, 1024U, 1048577U, 134219808U, 2048U,
131072U, 134350880U, 134217728U, 134219808U, 32U, 134217728U, 131104U, 134348800U, 134350880U, 133120U,
134350848U, 133152U, 2048U, 32U, 134348800U, 134217760U, 134219776U, 2080U, 133120U, 131104U,
134348832U, 134350848U, 2080U, 0U, 0U, 134348832U, 134217760U, 134219776U, 133152U, 131072U,
133152U, 131072U, 134350848U, 2048U, 32U, 134348832U, 2048U, 133152U, 134219776U, 32U,
134217760U, 134348800U, 134348832U, 134217728U, 131072U, 134219808U, 0U, 134350880U, 131104U, 134217760U,
134348800U, 134219776U, 134219808U, 0U, 134350880U, 133120U, 133120U, 2080U, 2080U, 131104U,
134217728U, 134350848U
};
// Token: 0x04001331 RID: 4913
private static readonly byte[] PC1 = new byte[]
{
56, 48, 40, 32, 24, 16, 8, 0, 57, 49,
41, 33, 25, 17, 9, 1, 58, 50, 42, 34,
26, 18, 10, 2, 59, 51, 43, 35, 62, 54,
46, 38, 30, 22, 14, 6, 61, 53, 45, 37,
29, 21, 13, 5, 60, 52, 44, 36, 28, 20,
12, 4, 27, 19, 11, 3
};
// Token: 0x04001332 RID: 4914
private static readonly byte[] leftRotTotal = new byte[]
{
1, 2, 4, 6, 8, 10, 12, 14, 15, 17,
19, 21, 23, 25, 27, 28
};
// Token: 0x04001333 RID: 4915
private static readonly byte[] PC2 = new byte[]
{
13, 16, 10, 23, 0, 4, 2, 27, 14, 5,
20, 9, 22, 18, 11, 3, 25, 7, 15, 6,
26, 19, 12, 1, 40, 51, 30, 36, 46, 54,
29, 39, 50, 44, 32, 47, 43, 48, 38, 55,
33, 52, 45, 41, 49, 35, 28, 31
};
// Token: 0x04001334 RID: 4916
internal static readonly uint[] ipTab = new uint[]
{
0U, 0U, 256U, 0U, 0U, 256U, 256U, 256U, 1U, 0U,
257U, 0U, 1U, 256U, 257U, 256U, 0U, 1U, 256U, 1U,
0U, 257U, 256U, 257U, 1U, 1U, 257U, 1U, 1U, 257U,
257U, 257U, 0U, 0U, 16777216U, 0U, 0U, 16777216U, 16777216U, 16777216U,
65536U, 0U, 16842752U, 0U, 65536U, 16777216U, 16842752U, 16777216U, 0U, 65536U,
16777216U, 65536U, 0U, 16842752U, 16777216U, 16842752U, 65536U, 65536U, 16842752U, 65536U,
65536U, 16842752U, 16842752U, 16842752U, 0U, 0U, 512U, 0U, 0U, 512U,
512U, 512U, 2U, 0U, 514U, 0U, 2U, 512U, 514U, 512U,
0U, 2U, 512U, 2U, 0U, 514U, 512U, 514U, 2U, 2U,
514U, 2U, 2U, 514U, 514U, 514U, 0U, 0U, 33554432U, 0U,
0U, 33554432U, 33554432U, 33554432U, 131072U, 0U, 33685504U, 0U, 131072U, 33554432U,
33685504U, 33554432U, 0U, 131072U, 33554432U, 131072U, 0U, 33685504U, 33554432U, 33685504U,
131072U, 131072U, 33685504U, 131072U, 131072U, 33685504U, 33685504U, 33685504U, 0U, 0U,
1024U, 0U, 0U, 1024U, 1024U, 1024U, 4U, 0U, 1028U, 0U,
4U, 1024U, 1028U, 1024U, 0U, 4U, 1024U, 4U, 0U, 1028U,
1024U, 1028U, 4U, 4U, 1028U, 4U, 4U, 1028U, 1028U, 1028U,
0U, 0U, 67108864U, 0U, 0U, 67108864U, 67108864U, 67108864U, 262144U, 0U,
67371008U, 0U, 262144U, 67108864U, 67371008U, 67108864U, 0U, 262144U, 67108864U, 262144U,
0U, 67371008U, 67108864U, 67371008U, 262144U, 262144U, 67371008U, 262144U, 262144U, 67371008U,
67371008U, 67371008U, 0U, 0U, 2048U, 0U, 0U, 2048U, 2048U, 2048U,
8U, 0U, 2056U, 0U, 8U, 2048U, 2056U, 2048U, 0U, 8U,
2048U, 8U, 0U, 2056U, 2048U, 2056U, 8U, 8U, 2056U, 8U,
8U, 2056U, 2056U, 2056U, 0U, 0U, 134217728U, 0U, 0U, 134217728U,
134217728U, 134217728U, 524288U, 0U, 134742016U, 0U, 524288U, 134217728U, 134742016U, 134217728U,
0U, 524288U, 134217728U, 524288U, 0U, 134742016U, 134217728U, 134742016U, 524288U, 524288U,
134742016U, 524288U, 524288U, 134742016U, 134742016U, 134742016U, 0U, 0U, 4096U, 0U,
0U, 4096U, 4096U, 4096U, 16U, 0U, 4112U, 0U, 16U, 4096U,
4112U, 4096U, 0U, 16U, 4096U, 16U, 0U, 4112U, 4096U, 4112U,
16U, 16U, 4112U, 16U, 16U, 4112U, 4112U, 4112U, 0U, 0U,
268435456U, 0U, 0U, 268435456U, 268435456U, 268435456U, 1048576U, 0U, 269484032U, 0U,
1048576U, 268435456U, 269484032U, 268435456U, 0U, 1048576U, 268435456U, 1048576U, 0U, 269484032U,
268435456U, 269484032U, 1048576U, 1048576U, 269484032U, 1048576U, 1048576U, 269484032U, 269484032U, 269484032U,
0U, 0U, 8192U, 0U, 0U, 8192U, 8192U, 8192U, 32U, 0U,
8224U, 0U, 32U, 8192U, 8224U, 8192U, 0U, 32U, 8192U, 32U,
0U, 8224U, 8192U, 8224U, 32U, 32U, 8224U, 32U, 32U, 8224U,
8224U, 8224U, 0U, 0U, 536870912U, 0U, 0U, 536870912U, 536870912U, 536870912U,
2097152U, 0U, 538968064U, 0U, 2097152U, 536870912U, 538968064U, 536870912U, 0U, 2097152U,
536870912U, 2097152U, 0U, 538968064U, 536870912U, 538968064U, 2097152U, 2097152U, 538968064U, 2097152U,
2097152U, 538968064U, 538968064U, 538968064U, 0U, 0U, 16384U, 0U, 0U, 16384U,
16384U, 16384U, 64U, 0U, 16448U, 0U, 64U, 16384U, 16448U, 16384U,
0U, 64U, 16384U, 64U, 0U, 16448U, 16384U, 16448U, 64U, 64U,
16448U, 64U, 64U, 16448U, 16448U, 16448U, 0U, 0U, 1073741824U, 0U,
0U, 1073741824U, 1073741824U, 1073741824U, 4194304U, 0U, 1077936128U, 0U, 4194304U, 1073741824U,
1077936128U, 1073741824U, 0U, 4194304U, 1073741824U, 4194304U, 0U, 1077936128U, 1073741824U, 1077936128U,
4194304U, 4194304U, 1077936128U, 4194304U, 4194304U, 1077936128U, 1077936128U, 1077936128U, 0U, 0U,
32768U, 0U, 0U, 32768U, 32768U, 32768U, 128U, 0U, 32896U, 0U,
128U, 32768U, 32896U, 32768U, 0U, 128U, 32768U, 128U, 0U, 32896U,
32768U, 32896U, 128U, 128U, 32896U, 128U, 128U, 32896U, 32896U, 32896U,
0U, 0U, 2147483648U, 0U, 0U, 2147483648U, 2147483648U, 2147483648U, 8388608U, 0U,
2155872256U, 0U, 8388608U, 2147483648U, 2155872256U, 2147483648U, 0U, 8388608U, 2147483648U, 8388608U,
0U, 2155872256U, 2147483648U, 2155872256U, 8388608U, 8388608U, 2155872256U, 8388608U, 8388608U, 2155872256U,
2155872256U, 2155872256U
};
// Token: 0x04001335 RID: 4917
internal static readonly uint[] fpTab = new uint[]
{
0U, 0U, 0U, 64U, 0U, 16384U, 0U, 16448U, 0U, 4194304U,
0U, 4194368U, 0U, 4210688U, 0U, 4210752U, 0U, 1073741824U, 0U, 1073741888U,
0U, 1073758208U, 0U, 1073758272U, 0U, 1077936128U, 0U, 1077936192U, 0U, 1077952512U,
0U, 1077952576U, 0U, 0U, 64U, 0U, 16384U, 0U, 16448U, 0U,
4194304U, 0U, 4194368U, 0U, 4210688U, 0U, 4210752U, 0U, 1073741824U, 0U,
1073741888U, 0U, 1073758208U, 0U, 1073758272U, 0U, 1077936128U, 0U, 1077936192U, 0U,
1077952512U, 0U, 1077952576U, 0U, 0U, 0U, 0U, 16U, 0U, 4096U,
0U, 4112U, 0U, 1048576U, 0U, 1048592U, 0U, 1052672U, 0U, 1052688U,
0U, 268435456U, 0U, 268435472U, 0U, 268439552U, 0U, 268439568U, 0U, 269484032U,
0U, 269484048U, 0U, 269488128U, 0U, 269488144U, 0U, 0U, 16U, 0U,
4096U, 0U, 4112U, 0U, 1048576U, 0U, 1048592U, 0U, 1052672U, 0U,
1052688U, 0U, 268435456U, 0U, 268435472U, 0U, 268439552U, 0U, 268439568U, 0U,
269484032U, 0U, 269484048U, 0U, 269488128U, 0U, 269488144U, 0U, 0U, 0U,
0U, 4U, 0U, 1024U, 0U, 1028U, 0U, 262144U, 0U, 262148U,
0U, 263168U, 0U, 263172U, 0U, 67108864U, 0U, 67108868U, 0U, 67109888U,
0U, 67109892U, 0U, 67371008U, 0U, 67371012U, 0U, 67372032U, 0U, 67372036U,
0U, 0U, 4U, 0U, 1024U, 0U, 1028U, 0U, 262144U, 0U,
262148U, 0U, 263168U, 0U, 263172U, 0U, 67108864U, 0U, 67108868U, 0U,
67109888U, 0U, 67109892U, 0U, 67371008U, 0U, 67371012U, 0U, 67372032U, 0U,
67372036U, 0U, 0U, 0U, 0U, 1U, 0U, 256U, 0U, 257U,
0U, 65536U, 0U, 65537U, 0U, 65792U, 0U, 65793U, 0U, 16777216U,
0U, 16777217U, 0U, 16777472U, 0U, 16777473U, 0U, 16842752U, 0U, 16842753U,
0U, 16843008U, 0U, 16843009U, 0U, 0U, 1U, 0U, 256U, 0U,
257U, 0U, 65536U, 0U, 65537U, 0U, 65792U, 0U, 65793U, 0U,
16777216U, 0U, 16777217U, 0U, 16777472U, 0U, 16777473U, 0U, 16842752U, 0U,
16842753U, 0U, 16843008U, 0U, 16843009U, 0U, 0U, 0U, 0U, 128U,
0U, 32768U, 0U, 32896U, 0U, 8388608U, 0U, 8388736U, 0U, 8421376U,
0U, 8421504U, 0U, 2147483648U, 0U, 2147483776U, 0U, 2147516416U, 0U, 2147516544U,
0U, 2155872256U, 0U, 2155872384U, 0U, 2155905024U, 0U, 2155905152U, 0U, 0U,
128U, 0U, 32768U, 0U, 32896U, 0U, 8388608U, 0U, 8388736U, 0U,
8421376U, 0U, 8421504U, 0U, 2147483648U, 0U, 2147483776U, 0U, 2147516416U, 0U,
2147516544U, 0U, 2155872256U, 0U, 2155872384U, 0U, 2155905024U, 0U, 2155905152U, 0U,
0U, 0U, 0U, 32U, 0U, 8192U, 0U, 8224U, 0U, 2097152U,
0U, 2097184U, 0U, 2105344U, 0U, 2105376U, 0U, 536870912U, 0U, 536870944U,
0U, 536879104U, 0U, 536879136U, 0U, 538968064U, 0U, 538968096U, 0U, 538976256U,
0U, 538976288U, 0U, 0U, 32U, 0U, 8192U, 0U, 8224U, 0U,
2097152U, 0U, 2097184U, 0U, 2105344U, 0U, 2105376U, 0U, 536870912U, 0U,
536870944U, 0U, 536879104U, 0U, 536879136U, 0U, 538968064U, 0U, 538968096U, 0U,
538976256U, 0U, 538976288U, 0U, 0U, 0U, 0U, 8U, 0U, 2048U,
0U, 2056U, 0U, 524288U, 0U, 524296U, 0U, 526336U, 0U, 526344U,
0U, 134217728U, 0U, 134217736U, 0U, 134219776U, 0U, 134219784U, 0U, 134742016U,
0U, 134742024U, 0U, 134744064U, 0U, 134744072U, 0U, 0U, 8U, 0U,
2048U, 0U, 2056U, 0U, 524288U, 0U, 524296U, 0U, 526336U, 0U,
526344U, 0U, 134217728U, 0U, 134217736U, 0U, 134219776U, 0U, 134219784U, 0U,
134742016U, 0U, 134742024U, 0U, 134744064U, 0U, 134744072U, 0U, 0U, 0U,
0U, 2U, 0U, 512U, 0U, 514U, 0U, 131072U, 0U, 131074U,
0U, 131584U, 0U, 131586U, 0U, 33554432U, 0U, 33554434U, 0U, 33554944U,
0U, 33554946U, 0U, 33685504U, 0U, 33685506U, 0U, 33686016U, 0U, 33686018U,
0U, 0U, 2U, 0U, 512U, 0U, 514U, 0U, 131072U, 0U,
131074U, 0U, 131584U, 0U, 131586U, 0U, 33554432U, 0U, 33554434U, 0U,
33554944U, 0U, 33554946U, 0U, 33685504U, 0U, 33685506U, 0U, 33686016U, 0U,
33686018U, 0U
};
}
}
@@ -0,0 +1,178 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using Mono.Security;
namespace System.Security.Cryptography
{
/// <summary>Represents the abstract base class from which all implementations of the Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) must inherit.</summary>
// Token: 0x020004F9 RID: 1273
[ComVisible(true)]
public abstract class DSA : AsymmetricAlgorithm
{
/// <summary>Creates the default cryptographic object used to perform the asymmetric algorithm.</summary>
/// <returns>A cryptographic object used to perform the asymmetric algorithm.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x06002F0B RID: 12043 RVA: 0x00097824 File Offset: 0x00095A24
public new static DSA Create()
{
return DSA.Create("System.Security.Cryptography.DSA");
}
/// <summary>Creates the specified cryptographic object used to perform the asymmetric algorithm.</summary>
/// <returns>A cryptographic object used to perform the asymmetric algorithm.</returns>
/// <param name="algName">The name of the specific implementation of <see cref="T:System.Security.Cryptography.DSA" /> to use. </param>
// Token: 0x06002F0C RID: 12044 RVA: 0x00097830 File Offset: 0x00095A30
public new static DSA Create(string algName)
{
return (DSA)CryptoConfig.CreateFromName(algName);
}
/// <summary>When overridden in a derived class, creates the <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</summary>
/// <returns>The digital signature for the specified data.</returns>
/// <param name="rgbHash">The data to be signed. </param>
// Token: 0x06002F0D RID: 12045
public abstract byte[] CreateSignature(byte[] rgbHash);
/// <summary>When overridden in a derived class, exports the <see cref="T:System.Security.Cryptography.DSAParameters" />.</summary>
/// <returns>The parameters for <see cref="T:System.Security.Cryptography.DSA" />.</returns>
/// <param name="includePrivateParameters">true to include private parameters; otherwise, false. </param>
// Token: 0x06002F0E RID: 12046
public abstract DSAParameters ExportParameters(bool includePrivateParameters);
// Token: 0x06002F0F RID: 12047 RVA: 0x00097840 File Offset: 0x00095A40
internal void ZeroizePrivateKey(DSAParameters parameters)
{
if (parameters.X != null)
{
Array.Clear(parameters.X, 0, parameters.X.Length);
}
}
/// <summary>Reconstructs a <see cref="T:System.Security.Cryptography.DSA" /> object from an XML string.</summary>
/// <param name="xmlString">The XML string to use to reconstruct the <see cref="T:System.Security.Cryptography.DSA" /> object. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="xmlString" /> parameter is null. </exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The format of the <paramref name="xmlString" /> parameter is not valid. </exception>
// Token: 0x06002F10 RID: 12048 RVA: 0x00097870 File Offset: 0x00095A70
public override void FromXmlString(string xmlString)
{
if (xmlString == null)
{
throw new ArgumentNullException("xmlString");
}
DSAParameters dsaparameters = default(DSAParameters);
try
{
dsaparameters.P = AsymmetricAlgorithm.GetNamedParam(xmlString, "P");
dsaparameters.Q = AsymmetricAlgorithm.GetNamedParam(xmlString, "Q");
dsaparameters.G = AsymmetricAlgorithm.GetNamedParam(xmlString, "G");
dsaparameters.J = AsymmetricAlgorithm.GetNamedParam(xmlString, "J");
dsaparameters.Y = AsymmetricAlgorithm.GetNamedParam(xmlString, "Y");
dsaparameters.X = AsymmetricAlgorithm.GetNamedParam(xmlString, "X");
dsaparameters.Seed = AsymmetricAlgorithm.GetNamedParam(xmlString, "Seed");
byte[] namedParam = AsymmetricAlgorithm.GetNamedParam(xmlString, "PgenCounter");
if (namedParam != null)
{
byte[] array = new byte[4];
Buffer.BlockCopy(namedParam, 0, array, 0, namedParam.Length);
dsaparameters.Counter = BitConverterLE.ToInt32(array, 0);
}
this.ImportParameters(dsaparameters);
}
catch
{
this.ZeroizePrivateKey(dsaparameters);
throw;
}
finally
{
this.ZeroizePrivateKey(dsaparameters);
}
}
/// <summary>When overridden in a derived class, imports the specified <see cref="T:System.Security.Cryptography.DSAParameters" />.</summary>
/// <param name="parameters">The parameters for <see cref="T:System.Security.Cryptography.DSA" />. </param>
// Token: 0x06002F11 RID: 12049
public abstract void ImportParameters(DSAParameters parameters);
/// <summary>Creates and returns an XML string representation of the current <see cref="T:System.Security.Cryptography.DSA" /> object.</summary>
/// <returns>An XML string encoding of the current <see cref="T:System.Security.Cryptography.DSA" /> object.</returns>
/// <param name="includePrivateParameters">true to include private parameters; otherwise, false. </param>
// Token: 0x06002F12 RID: 12050 RVA: 0x000979A0 File Offset: 0x00095BA0
public override string ToXmlString(bool includePrivateParameters)
{
StringBuilder stringBuilder = new StringBuilder();
DSAParameters dsaparameters = this.ExportParameters(includePrivateParameters);
try
{
stringBuilder.Append("<DSAKeyValue>");
stringBuilder.Append("<P>");
stringBuilder.Append(Convert.ToBase64String(dsaparameters.P));
stringBuilder.Append("</P>");
stringBuilder.Append("<Q>");
stringBuilder.Append(Convert.ToBase64String(dsaparameters.Q));
stringBuilder.Append("</Q>");
stringBuilder.Append("<G>");
stringBuilder.Append(Convert.ToBase64String(dsaparameters.G));
stringBuilder.Append("</G>");
stringBuilder.Append("<Y>");
stringBuilder.Append(Convert.ToBase64String(dsaparameters.Y));
stringBuilder.Append("</Y>");
if (dsaparameters.J != null)
{
stringBuilder.Append("<J>");
stringBuilder.Append(Convert.ToBase64String(dsaparameters.J));
stringBuilder.Append("</J>");
}
if (dsaparameters.Seed != null)
{
stringBuilder.Append("<Seed>");
stringBuilder.Append(Convert.ToBase64String(dsaparameters.Seed));
stringBuilder.Append("</Seed>");
stringBuilder.Append("<PgenCounter>");
if (dsaparameters.Counter != 0)
{
byte[] bytes = BitConverterLE.GetBytes(dsaparameters.Counter);
int num = bytes.Length;
while (bytes[num - 1] == 0)
{
num--;
}
stringBuilder.Append(Convert.ToBase64String(bytes, 0, num));
}
else
{
stringBuilder.Append("AA==");
}
stringBuilder.Append("</PgenCounter>");
}
if (dsaparameters.X != null)
{
stringBuilder.Append("<X>");
stringBuilder.Append(Convert.ToBase64String(dsaparameters.X));
stringBuilder.Append("</X>");
}
else if (includePrivateParameters)
{
throw new ArgumentNullException("X");
}
stringBuilder.Append("</DSAKeyValue>");
}
catch
{
this.ZeroizePrivateKey(dsaparameters);
throw;
}
return stringBuilder.ToString();
}
/// <summary>When overridden in a derived class, verifies the <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</summary>
/// <returns>true if <paramref name="rgbSignature" /> matches the signature computed using the specified hash algorithm and key on <paramref name="rgbHash" />; otherwise, false.</returns>
/// <param name="rgbHash">The hash of the data signed with <paramref name="rgbSignature" />. </param>
/// <param name="rgbSignature">The signature to be verified for <paramref name="rgbData" />. </param>
// Token: 0x06002F13 RID: 12051
public abstract bool VerifySignature(byte[] rgbHash, byte[] rgbSignature);
}
}
@@ -0,0 +1,443 @@
using System;
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// <summary>Defines a wrapper object to access the cryptographic service provider (CSP) implementation of the <see cref="T:System.Security.Cryptography.DSA" /> algorithm. This class cannot be inherited. </summary>
// Token: 0x020004FA RID: 1274
[ComVisible(true)]
public sealed class DSACryptoServiceProvider : DSA, ICspAsymmetricAlgorithm
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> class.</summary>
// Token: 0x06002F14 RID: 12052 RVA: 0x00097BD8 File Offset: 0x00095DD8
public DSACryptoServiceProvider()
: this(1024, null)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> class with the specified parameters for the cryptographic service provider (CSP).</summary>
/// <param name="parameters">The parameters for the CSP. </param>
// Token: 0x06002F15 RID: 12053 RVA: 0x00097BE8 File Offset: 0x00095DE8
public DSACryptoServiceProvider(CspParameters parameters)
: this(1024, parameters)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> class with the specified key size.</summary>
/// <param name="dwKeySize">The size of the key for the asymmetric algorithm in bits. </param>
// Token: 0x06002F16 RID: 12054 RVA: 0x00097BF8 File Offset: 0x00095DF8
public DSACryptoServiceProvider(int dwKeySize)
: this(dwKeySize, null)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> class with the specified key size and parameters for the cryptographic service provider (CSP).</summary>
/// <param name="dwKeySize">The size of the key for the cryptographic algorithm in bits. </param>
/// <param name="parameters">The parameters for the CSP. </param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The CSP cannot be acquired.-or- The key cannot be created. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="dwKeySize" /> is out of range.</exception>
// Token: 0x06002F17 RID: 12055 RVA: 0x00097C04 File Offset: 0x00095E04
public DSACryptoServiceProvider(int dwKeySize, CspParameters parameters)
{
this.LegalKeySizesValue = new KeySizes[1];
this.LegalKeySizesValue[0] = new KeySizes(512, 1024, 64);
this.KeySize = dwKeySize;
this.dsa = new DSAManaged(dwKeySize);
this.dsa.KeyGenerated += this.OnKeyGenerated;
this.persistKey = parameters != null;
if (parameters == null)
{
parameters = new CspParameters(13);
if (DSACryptoServiceProvider.useMachineKeyStore)
{
parameters.Flags |= CspProviderFlags.UseMachineKeyStore;
}
this.store = new KeyPairPersistence(parameters);
}
else
{
this.store = new KeyPairPersistence(parameters);
this.store.Load();
if (this.store.KeyValue != null)
{
this.persisted = true;
this.FromXmlString(this.store.KeyValue);
}
}
}
// Token: 0x06002F19 RID: 12057 RVA: 0x00097CF8 File Offset: 0x00095EF8
~DSACryptoServiceProvider()
{
this.Dispose(false);
}
/// <summary>Gets the name of the key exchange algorithm.</summary>
/// <returns>The name of the key exchange algorithm.</returns>
// Token: 0x1700094C RID: 2380
// (get) Token: 0x06002F1A RID: 12058 RVA: 0x00097D34 File Offset: 0x00095F34
public override string KeyExchangeAlgorithm
{
get
{
return null;
}
}
/// <summary>Gets the size of the key used by the asymmetric algorithm in bits.</summary>
/// <returns>The size of the key used by the asymmetric algorithm.</returns>
// Token: 0x1700094D RID: 2381
// (get) Token: 0x06002F1B RID: 12059 RVA: 0x00097D38 File Offset: 0x00095F38
public override int KeySize
{
get
{
return this.dsa.KeySize;
}
}
/// <summary>Gets or sets a value indicating whether the key should be persisted in the cryptographic service provider (CSP).</summary>
/// <returns>true if the key should be persisted in the CSP; otherwise, false.</returns>
// Token: 0x1700094E RID: 2382
// (get) Token: 0x06002F1C RID: 12060 RVA: 0x00097D48 File Offset: 0x00095F48
// (set) Token: 0x06002F1D RID: 12061 RVA: 0x00097D50 File Offset: 0x00095F50
public bool PersistKeyInCsp
{
get
{
return this.persistKey;
}
set
{
this.persistKey = value;
}
}
/// <summary>Gets a value that indicates whether the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object contains only a public key.</summary>
/// <returns>true if the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object contains only a public key; otherwise, false.</returns>
// Token: 0x1700094F RID: 2383
// (get) Token: 0x06002F1E RID: 12062 RVA: 0x00097D5C File Offset: 0x00095F5C
[ComVisible(false)]
public bool PublicOnly
{
get
{
return this.dsa.PublicOnly;
}
}
/// <summary>Gets the name of the signature algorithm.</summary>
/// <returns>The name of the signature algorithm.</returns>
// Token: 0x17000950 RID: 2384
// (get) Token: 0x06002F1F RID: 12063 RVA: 0x00097D6C File Offset: 0x00095F6C
public override string SignatureAlgorithm
{
get
{
return "http://www.w3.org/2000/09/xmldsig#dsa-sha1";
}
}
/// <summary>Gets or sets a value indicating whether the key should be persisted in the computer's key store instead of the user profile store.</summary>
/// <returns>true if the key should be persisted in the computer key store; otherwise, false.</returns>
// Token: 0x17000951 RID: 2385
// (get) Token: 0x06002F20 RID: 12064 RVA: 0x00097D74 File Offset: 0x00095F74
// (set) Token: 0x06002F21 RID: 12065 RVA: 0x00097D7C File Offset: 0x00095F7C
public static bool UseMachineKeyStore
{
get
{
return DSACryptoServiceProvider.useMachineKeyStore;
}
set
{
DSACryptoServiceProvider.useMachineKeyStore = value;
}
}
/// <summary>Exports the <see cref="T:System.Security.Cryptography.DSAParameters" />.</summary>
/// <returns>The parameters for <see cref="T:System.Security.Cryptography.DSA" />.</returns>
/// <param name="includePrivateParameters">true to include private parameters; otherwise, false. </param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key cannot be exported. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F22 RID: 12066 RVA: 0x00097D84 File Offset: 0x00095F84
public override DSAParameters ExportParameters(bool includePrivateParameters)
{
if (includePrivateParameters && !this.privateKeyExportable)
{
throw new CryptographicException(Locale.GetText("Cannot export private key"));
}
return this.dsa.ExportParameters(includePrivateParameters);
}
/// <summary>Imports the specified <see cref="T:System.Security.Cryptography.DSAParameters" />.</summary>
/// <param name="parameters">The parameters for <see cref="T:System.Security.Cryptography.DSA" />. </param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.-or- The <paramref name="parameters" /> parameter has missing fields. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F23 RID: 12067 RVA: 0x00097DB4 File Offset: 0x00095FB4
public override void ImportParameters(DSAParameters parameters)
{
this.dsa.ImportParameters(parameters);
}
/// <summary>Creates the <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</summary>
/// <returns>The digital signature for the specified data.</returns>
/// <param name="rgbHash">The data to be signed. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F24 RID: 12068 RVA: 0x00097DC4 File Offset: 0x00095FC4
public override byte[] CreateSignature(byte[] rgbHash)
{
return this.dsa.CreateSignature(rgbHash);
}
/// <summary>Computes the hash value of the specified byte array and signs the resulting hash value.</summary>
/// <returns>The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</returns>
/// <param name="buffer">The input data for which to compute the hash. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F25 RID: 12069 RVA: 0x00097DD4 File Offset: 0x00095FD4
public byte[] SignData(byte[] buffer)
{
HashAlgorithm hashAlgorithm = SHA1.Create();
byte[] array = hashAlgorithm.ComputeHash(buffer);
return this.dsa.CreateSignature(array);
}
/// <summary>Signs a byte array from the specified start point to the specified end point.</summary>
/// <returns>The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</returns>
/// <param name="buffer">The input data to sign. </param>
/// <param name="offset">The offset into the array from which to begin using data. </param>
/// <param name="count">The number of bytes in the array to use as data. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F26 RID: 12070 RVA: 0x00097DFC File Offset: 0x00095FFC
public byte[] SignData(byte[] buffer, int offset, int count)
{
HashAlgorithm hashAlgorithm = SHA1.Create();
byte[] array = hashAlgorithm.ComputeHash(buffer, offset, count);
return this.dsa.CreateSignature(array);
}
/// <summary>Computes the hash value of the specified input stream and signs the resulting hash value.</summary>
/// <returns>The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</returns>
/// <param name="inputStream">The input data for which to compute the hash. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F27 RID: 12071 RVA: 0x00097E28 File Offset: 0x00096028
public byte[] SignData(Stream inputStream)
{
HashAlgorithm hashAlgorithm = SHA1.Create();
byte[] array = hashAlgorithm.ComputeHash(inputStream);
return this.dsa.CreateSignature(array);
}
/// <summary>Computes the signature for the specified hash value by encrypting it with the private key.</summary>
/// <returns>The <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified hash value.</returns>
/// <param name="rgbHash">The hash value of the data to be signed. </param>
/// <param name="str">The name of the hash algorithm used to create the hash value of the data. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rgbHash" /> parameter is null. </exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.-or- There is no private key. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F28 RID: 12072 RVA: 0x00097E50 File Offset: 0x00096050
public byte[] SignHash(byte[] rgbHash, string str)
{
if (string.Compare(str, "SHA1", true, CultureInfo.InvariantCulture) != 0)
{
throw new CryptographicException(Locale.GetText("Only SHA1 is supported."));
}
return this.dsa.CreateSignature(rgbHash);
}
/// <summary>Verifies the specified data using the specified signature.</summary>
/// <returns>true if the signature verifies the data; otherwise, false.</returns>
/// <param name="rgbData">The data that was signed. </param>
/// <param name="rgbSignature">The signature data to verify. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F29 RID: 12073 RVA: 0x00097E90 File Offset: 0x00096090
public bool VerifyData(byte[] rgbData, byte[] rgbSignature)
{
HashAlgorithm hashAlgorithm = SHA1.Create();
byte[] array = hashAlgorithm.ComputeHash(rgbData);
return this.dsa.VerifySignature(array, rgbSignature);
}
/// <summary>Verifies the specified hash data using the specified signature.</summary>
/// <returns>true if the signature verifies the hash; otherwise, false.</returns>
/// <param name="rgbHash">The hash value of the data to be signed. </param>
/// <param name="str">The name of the hash algorithm used to create the hash value of the data. </param>
/// <param name="rgbSignature">The signature data to verify. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="rgbHash" /> parameter is null.-or- The <paramref name="rgbSignature" /> parameter is null. </exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The cryptographic service provider (CSP) cannot be acquired.-or- The signature cannot be verified. </exception>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F2A RID: 12074 RVA: 0x00097EB8 File Offset: 0x000960B8
public bool VerifyHash(byte[] rgbHash, string str, byte[] rgbSignature)
{
if (str == null)
{
str = "SHA1";
}
if (string.Compare(str, "SHA1", true, CultureInfo.InvariantCulture) != 0)
{
throw new CryptographicException(Locale.GetText("Only SHA1 is supported."));
}
return this.dsa.VerifySignature(rgbHash, rgbSignature);
}
/// <summary>Verifies the <see cref="T:System.Security.Cryptography.DSA" /> signature for the specified data.</summary>
/// <returns>true if <paramref name="rgbSignature" /> matches the signature that is computed using the specified hash algorithm and key on <paramref name="rgbHash" />; otherwise, false.</returns>
/// <param name="rgbHash">The data signed with <paramref name="rgbSignature" />. </param>
/// <param name="rgbSignature">The signature to verify for <paramref name="rgbData" />. </param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F2B RID: 12075 RVA: 0x00097F08 File Offset: 0x00096108
public override bool VerifySignature(byte[] rgbHash, byte[] rgbSignature)
{
return this.dsa.VerifySignature(rgbHash, rgbSignature);
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x06002F2C RID: 12076 RVA: 0x00097F18 File Offset: 0x00096118
protected override void Dispose(bool disposing)
{
if (!this.m_disposed)
{
if (this.persisted && !this.persistKey)
{
this.store.Remove();
}
if (this.dsa != null)
{
this.dsa.Clear();
}
this.m_disposed = true;
}
}
// Token: 0x06002F2D RID: 12077 RVA: 0x00097F70 File Offset: 0x00096170
private void OnKeyGenerated(object sender, EventArgs e)
{
if (this.persistKey && !this.persisted)
{
this.store.KeyValue = this.ToXmlString(!this.dsa.PublicOnly);
this.store.Save();
this.persisted = true;
}
}
/// <summary>Gets a <see cref="T:System.Security.Cryptography.CspKeyContainerInfo" /> object that describes additional information about a cryptographic key pair. </summary>
/// <returns>A <see cref="T:System.Security.Cryptography.CspKeyContainerInfo" /> object that describes additional information about a cryptographic key pair.</returns>
// Token: 0x17000952 RID: 2386
// (get) Token: 0x06002F2E RID: 12078 RVA: 0x00097FC4 File Offset: 0x000961C4
[ComVisible(false)]
[MonoTODO("call into KeyPairPersistence to get details")]
public CspKeyContainerInfo CspKeyContainerInfo
{
get
{
return null;
}
}
/// <summary>Exports a blob containing the key information associated with a <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object. </summary>
/// <returns>A byte array containing the key information associated with a <see cref="T:System.Security.Cryptography.DSACryptoServiceProvider" /> object.</returns>
/// <param name="includePrivateParameters">true to include the private key; otherwise, false.</param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F2F RID: 12079 RVA: 0x00097FC8 File Offset: 0x000961C8
[ComVisible(false)]
public byte[] ExportCspBlob(bool includePrivateParameters)
{
byte[] array;
if (includePrivateParameters)
{
array = CryptoConvert.ToCapiPrivateKeyBlob(this);
}
else
{
array = CryptoConvert.ToCapiPublicKeyBlob(this);
}
return array;
}
/// <summary>Imports a blob that represents DSA key information.</summary>
/// <param name="keyBlob">A byte array that represents a DSA key blob.</param>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// <IPermission class="System.Security.Permissions.KeyContainerPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06002F30 RID: 12080 RVA: 0x00097FF4 File Offset: 0x000961F4
[ComVisible(false)]
public void ImportCspBlob(byte[] keyBlob)
{
if (keyBlob == null)
{
throw new ArgumentNullException("keyBlob");
}
DSA dsa = CryptoConvert.FromCapiKeyBlobDSA(keyBlob);
if (dsa is DSACryptoServiceProvider)
{
DSAParameters dsaparameters = dsa.ExportParameters(!(dsa as DSACryptoServiceProvider).PublicOnly);
this.ImportParameters(dsaparameters);
}
else
{
try
{
DSAParameters dsaparameters2 = dsa.ExportParameters(true);
this.ImportParameters(dsaparameters2);
}
catch
{
DSAParameters dsaparameters3 = dsa.ExportParameters(false);
this.ImportParameters(dsaparameters3);
}
}
}
// Token: 0x04001336 RID: 4918
private const int PROV_DSS_DH = 13;
// Token: 0x04001337 RID: 4919
private KeyPairPersistence store;
// Token: 0x04001338 RID: 4920
private bool persistKey;
// Token: 0x04001339 RID: 4921
private bool persisted;
// Token: 0x0400133A RID: 4922
private bool privateKeyExportable = true;
// Token: 0x0400133B RID: 4923
private bool m_disposed;
// Token: 0x0400133C RID: 4924
private DSAManaged dsa;
// Token: 0x0400133D RID: 4925
private static bool useMachineKeyStore;
}
}
@@ -0,0 +1,45 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Contains the typical parameters for the <see cref="T:System.Security.Cryptography.DSA" /> algorithm.</summary>
// Token: 0x020004FB RID: 1275
[ComVisible(true)]
[Serializable]
public struct DSAParameters
{
/// <summary>Specifies the counter for the <see cref="T:System.Security.Cryptography.DSA" /> algorithm.</summary>
// Token: 0x0400133E RID: 4926
public int Counter;
/// <summary>Specifies the G parameter for the <see cref="T:System.Security.Cryptography.DSA" /> algorithm.</summary>
// Token: 0x0400133F RID: 4927
public byte[] G;
/// <summary>Specifies the J parameter for the <see cref="T:System.Security.Cryptography.DSA" /> algorithm.</summary>
// Token: 0x04001340 RID: 4928
public byte[] J;
/// <summary>Specifies the P parameter for the <see cref="T:System.Security.Cryptography.DSA" /> algorithm.</summary>
// Token: 0x04001341 RID: 4929
public byte[] P;
/// <summary>Specifies the Q parameter for the <see cref="T:System.Security.Cryptography.DSA" /> algorithm.</summary>
// Token: 0x04001342 RID: 4930
public byte[] Q;
/// <summary>Specifies the seed for the <see cref="T:System.Security.Cryptography.DSA" /> algorithm.</summary>
// Token: 0x04001343 RID: 4931
public byte[] Seed;
/// <summary>Specifies the X parameter for the <see cref="T:System.Security.Cryptography.DSA" /> algorithm.</summary>
// Token: 0x04001344 RID: 4932
[NonSerialized]
public byte[] X;
/// <summary>Specifies the Y parameter for the <see cref="T:System.Security.Cryptography.DSA" /> algorithm.</summary>
// Token: 0x04001345 RID: 4933
public byte[] Y;
}
}
@@ -0,0 +1,82 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Verifies a Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) PKCS#1 v1.5 signature.</summary>
// Token: 0x020004FC RID: 1276
[ComVisible(true)]
public class DSASignatureDeformatter : AsymmetricSignatureDeformatter
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSASignatureDeformatter" /> class.</summary>
// Token: 0x06002F31 RID: 12081 RVA: 0x0009808C File Offset: 0x0009628C
public DSASignatureDeformatter()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSASignatureDeformatter" /> class with the specified key.</summary>
/// <param name="key">The instance of Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) that holds the key. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="key" /> is null.</exception>
// Token: 0x06002F32 RID: 12082 RVA: 0x00098094 File Offset: 0x00096294
public DSASignatureDeformatter(AsymmetricAlgorithm key)
{
this.SetKey(key);
}
/// <summary>Specifies the hash algorithm for the Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) signature deformatter.</summary>
/// <param name="strName">The name of the hash algorithm to use for the signature deformatter. </param>
/// <exception cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException">The <paramref name="strName" /> parameter does not map to the <see cref="T:System.Security.Cryptography.SHA1" /> hash algorithm. </exception>
// Token: 0x06002F33 RID: 12083 RVA: 0x000980A4 File Offset: 0x000962A4
public override void SetHashAlgorithm(string strName)
{
if (strName == null)
{
throw new ArgumentNullException("strName");
}
try
{
SHA1.Create(strName);
}
catch (InvalidCastException)
{
throw new CryptographicUnexpectedOperationException(Locale.GetText("DSA requires SHA1"));
}
}
/// <summary>Specifies the key to be used for the Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) signature deformatter.</summary>
/// <param name="key">The instance of <see cref="T:System.Security.Cryptography.DSA" /> that holds the key. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="key" /> is null.</exception>
// Token: 0x06002F34 RID: 12084 RVA: 0x00098100 File Offset: 0x00096300
public override void SetKey(AsymmetricAlgorithm key)
{
if (key != null)
{
this.dsa = (DSA)key;
return;
}
throw new ArgumentNullException("key");
}
/// <summary>Verifies the Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) signature on the data.</summary>
/// <returns>true if the signature is valid for the data; otherwise, false.</returns>
/// <param name="rgbHash">The data signed with <paramref name="rgbSignature" />. </param>
/// <param name="rgbSignature">The signature to be verified for <paramref name="rgbHash" />. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rgbHash" /> is null.-or-<paramref name="rgbSignature" /> is null.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException">The DSA key is missing.</exception>
// Token: 0x06002F35 RID: 12085 RVA: 0x00098130 File Offset: 0x00096330
public override bool VerifySignature(byte[] rgbHash, byte[] rgbSignature)
{
if (this.dsa == null)
{
throw new CryptographicUnexpectedOperationException(Locale.GetText("missing key"));
}
return this.dsa.VerifySignature(rgbHash, rgbSignature);
}
// Token: 0x04001346 RID: 4934
private DSA dsa;
}
}
@@ -0,0 +1,17 @@
using System;
namespace System.Security.Cryptography
{
// Token: 0x02000536 RID: 1334
internal class DSASignatureDescription : SignatureDescription
{
// Token: 0x060030DB RID: 12507 RVA: 0x000A803C File Offset: 0x000A623C
public DSASignatureDescription()
{
base.DeformatterAlgorithm = "System.Security.Cryptography.DSASignatureDeformatter";
base.DigestAlgorithm = "System.Security.Cryptography.SHA1CryptoServiceProvider";
base.FormatterAlgorithm = "System.Security.Cryptography.DSASignatureFormatter";
base.KeyAlgorithm = "System.Security.Cryptography.DSACryptoServiceProvider";
}
}
}
@@ -0,0 +1,81 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Creates a Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) signature.</summary>
// Token: 0x020004FD RID: 1277
[ComVisible(true)]
public class DSASignatureFormatter : AsymmetricSignatureFormatter
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSASignatureFormatter" /> class.</summary>
// Token: 0x06002F36 RID: 12086 RVA: 0x00098168 File Offset: 0x00096368
public DSASignatureFormatter()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.DSASignatureFormatter" /> class with the specified key.</summary>
/// <param name="key">The instance of the Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) that holds the key. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="key" /> is null.</exception>
// Token: 0x06002F37 RID: 12087 RVA: 0x00098170 File Offset: 0x00096370
public DSASignatureFormatter(AsymmetricAlgorithm key)
{
this.SetKey(key);
}
/// <summary>Creates the Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) PKCS #1 signature for the specified data.</summary>
/// <returns>The digital signature for the specified data.</returns>
/// <param name="rgbHash">The data to be signed. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="rgbHash" /> is null.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException">The OID is null.-or-The DSA key is null.</exception>
// Token: 0x06002F38 RID: 12088 RVA: 0x00098180 File Offset: 0x00096380
public override byte[] CreateSignature(byte[] rgbHash)
{
if (this.dsa == null)
{
throw new CryptographicUnexpectedOperationException(Locale.GetText("missing key"));
}
return this.dsa.CreateSignature(rgbHash);
}
/// <summary>Specifies the hash algorithm for the Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) signature formatter.</summary>
/// <param name="strName">The name of the hash algorithm to use for the signature formatter. </param>
/// <exception cref="T:System.Security.Cryptography.CryptographicUnexpectedOperationException">The <paramref name="strName" /> parameter does not map to the <see cref="T:System.Security.Cryptography.SHA1" /> hash algorithm. </exception>
// Token: 0x06002F39 RID: 12089 RVA: 0x000981AC File Offset: 0x000963AC
public override void SetHashAlgorithm(string strName)
{
if (strName == null)
{
throw new ArgumentNullException("strName");
}
try
{
SHA1.Create(strName);
}
catch (InvalidCastException)
{
throw new CryptographicUnexpectedOperationException(Locale.GetText("DSA requires SHA1"));
}
}
/// <summary>Specifies the key to be used for the Digital Signature Algorithm (<see cref="T:System.Security.Cryptography.DSA" />) signature formatter.</summary>
/// <param name="key">The instance of <see cref="T:System.Security.Cryptography.DSA" /> that holds the key. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="key" /> is null.</exception>
// Token: 0x06002F3A RID: 12090 RVA: 0x00098208 File Offset: 0x00096408
public override void SetKey(AsymmetricAlgorithm key)
{
if (key != null)
{
this.dsa = (DSA)key;
return;
}
throw new ArgumentNullException("key");
}
// Token: 0x04001347 RID: 4935
private DSA dsa;
}
}
@@ -0,0 +1,21 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Represents the abstract base class from which all classes that derive byte sequences of a specified length inherit.</summary>
// Token: 0x020004FE RID: 1278
[ComVisible(true)]
public abstract class DeriveBytes
{
/// <summary>When overridden in a derived class, returns pseudo-random key bytes.</summary>
/// <returns>A byte array filled with pseudo-random key bytes.</returns>
/// <param name="cb">The number of pseudo-random key bytes to generate. </param>
// Token: 0x06002F3C RID: 12092
public abstract byte[] GetBytes(int cb);
/// <summary>When overridden in a derived class, resets the state of the operation.</summary>
// Token: 0x06002F3D RID: 12093
public abstract void Reset();
}
}
@@ -0,0 +1,362 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Converts a <see cref="T:System.Security.Cryptography.CryptoStream" /> from base 64.</summary>
// Token: 0x02000500 RID: 1280
[ComVisible(true)]
public class FromBase64Transform : IDisposable, ICryptoTransform
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.FromBase64Transform" /> class.</summary>
// Token: 0x06002F3E RID: 12094 RVA: 0x00098240 File Offset: 0x00096440
public FromBase64Transform()
: this(FromBase64TransformMode.IgnoreWhiteSpaces)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.FromBase64Transform" /> class with the specified transformation mode.</summary>
/// <param name="whitespaces">One of the <see cref="T:System.Security.Cryptography.FromBase64Transform" /> values. </param>
// Token: 0x06002F3F RID: 12095 RVA: 0x0009824C File Offset: 0x0009644C
public FromBase64Transform(FromBase64TransformMode whitespaces)
{
this.mode = whitespaces;
this.accumulator = new byte[4];
this.accPtr = 0;
this.m_disposed = false;
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.FromBase64Transform" /> and optionally releases the managed resources.</summary>
// Token: 0x06002F40 RID: 12096 RVA: 0x00098278 File Offset: 0x00096478
void IDisposable.Dispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.FromBase64Transform" />.</summary>
// Token: 0x06002F41 RID: 12097 RVA: 0x00098288 File Offset: 0x00096488
~FromBase64Transform()
{
this.Dispose(false);
}
/// <summary>Gets a value that indicates whether multiple blocks can be transformed.</summary>
/// <returns>Always false.</returns>
// Token: 0x17000953 RID: 2387
// (get) Token: 0x06002F42 RID: 12098 RVA: 0x000982C4 File Offset: 0x000964C4
public bool CanTransformMultipleBlocks
{
get
{
return false;
}
}
/// <summary>Gets a value indicating whether the current transform can be reused.</summary>
/// <returns>Always true.</returns>
// Token: 0x17000954 RID: 2388
// (get) Token: 0x06002F43 RID: 12099 RVA: 0x000982C8 File Offset: 0x000964C8
public virtual bool CanReuseTransform
{
get
{
return true;
}
}
/// <summary>Gets the input block size.</summary>
/// <returns>The size of the input data blocks in bytes.</returns>
// Token: 0x17000955 RID: 2389
// (get) Token: 0x06002F44 RID: 12100 RVA: 0x000982CC File Offset: 0x000964CC
public int InputBlockSize
{
get
{
return 1;
}
}
/// <summary>Gets the output block size.</summary>
/// <returns>The size of the output data blocks in bytes.</returns>
// Token: 0x17000956 RID: 2390
// (get) Token: 0x06002F45 RID: 12101 RVA: 0x000982D0 File Offset: 0x000964D0
public int OutputBlockSize
{
get
{
return 3;
}
}
/// <summary>Releases all resources used by the <see cref="T:System.Security.Cryptography.FromBase64Transform" />.</summary>
// Token: 0x06002F46 RID: 12102 RVA: 0x000982D4 File Offset: 0x000964D4
public void Clear()
{
this.Dispose(true);
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.FromBase64Transform" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x06002F47 RID: 12103 RVA: 0x000982E0 File Offset: 0x000964E0
protected virtual void Dispose(bool disposing)
{
if (!this.m_disposed)
{
if (this.accumulator != null)
{
Array.Clear(this.accumulator, 0, this.accumulator.Length);
}
if (disposing)
{
this.accumulator = null;
}
this.m_disposed = true;
}
}
// Token: 0x06002F48 RID: 12104 RVA: 0x0009832C File Offset: 0x0009652C
private byte lookup(byte input)
{
if ((int)input >= this.lookupTable.Length)
{
throw new FormatException(Locale.GetText("Invalid character in a Base-64 string."));
}
byte b = this.lookupTable[(int)input];
if (b == 255)
{
throw new FormatException(Locale.GetText("Invalid character in a Base-64 string."));
}
return b;
}
// Token: 0x06002F49 RID: 12105 RVA: 0x0009837C File Offset: 0x0009657C
private int ProcessBlock(byte[] output, int offset)
{
int num = 0;
if (this.accumulator[3] == 61)
{
num++;
}
if (this.accumulator[2] == 61)
{
num++;
}
this.lookupTable = Base64Constants.DecodeTable;
switch (num)
{
case 0:
{
int num2 = (int)this.lookup(this.accumulator[0]);
int num3 = (int)this.lookup(this.accumulator[1]);
int num4 = (int)this.lookup(this.accumulator[2]);
int num5 = (int)this.lookup(this.accumulator[3]);
output[offset++] = (byte)((num2 << 2) | (num3 >> 4));
output[offset++] = (byte)((num3 << 4) | (num4 >> 2));
output[offset] = (byte)((num4 << 6) | num5);
break;
}
case 1:
{
int num2 = (int)this.lookup(this.accumulator[0]);
int num3 = (int)this.lookup(this.accumulator[1]);
int num4 = (int)this.lookup(this.accumulator[2]);
output[offset++] = (byte)((num2 << 2) | (num3 >> 4));
output[offset] = (byte)((num3 << 4) | (num4 >> 2));
break;
}
case 2:
{
int num2 = (int)this.lookup(this.accumulator[0]);
int num3 = (int)this.lookup(this.accumulator[1]);
output[offset] = (byte)((num2 << 2) | (num3 >> 4));
break;
}
}
return 3 - num;
}
// Token: 0x06002F4A RID: 12106 RVA: 0x000984C4 File Offset: 0x000966C4
private void CheckInputParameters(byte[] inputBuffer, int inputOffset, int inputCount)
{
if (inputBuffer == null)
{
throw new ArgumentNullException("inputBuffer");
}
if (inputOffset < 0)
{
throw new ArgumentOutOfRangeException("inputOffset", "< 0");
}
if (inputCount > inputBuffer.Length)
{
throw new OutOfMemoryException("inputCount " + Locale.GetText("Overflow"));
}
if (inputOffset > inputBuffer.Length - inputCount)
{
throw new ArgumentException("inputOffset", Locale.GetText("Overflow"));
}
if (inputCount < 0)
{
throw new OverflowException("inputCount < 0");
}
}
/// <summary>Converts the specified region of the input byte array from base 64 and copies the result to the specified region of the output byte array.</summary>
/// <returns>The number of bytes written.</returns>
/// <param name="inputBuffer">The input to compute from base 64. </param>
/// <param name="inputOffset">The offset into the input byte array from which to begin using data. </param>
/// <param name="inputCount">The number of bytes in the input byte array to use as data. </param>
/// <param name="outputBuffer">The output to which to write the result. </param>
/// <param name="outputOffset">The offset into the output byte array from which to begin writing data. </param>
/// <exception cref="T:System.ObjectDisposedException">The current <see cref="T:System.Security.Cryptography.FromBase64Transform" /> object has already been disposed. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="inputCount" /> uses an invalid value.-or-<paramref name="inputBuffer" /> has an invalid offset length.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="inputOffset" /> is out of range. This parameter requires a non-negative number.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="inputBuffer" /> is null.</exception>
// Token: 0x06002F4B RID: 12107 RVA: 0x00098550 File Offset: 0x00096750
public int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
{
if (this.m_disposed)
{
throw new ObjectDisposedException("FromBase64Transform");
}
this.CheckInputParameters(inputBuffer, inputOffset, inputCount);
if (outputBuffer == null || outputOffset < 0)
{
throw new FormatException("outputBuffer");
}
int num = 0;
while (inputCount > 0)
{
if (this.accPtr < 4)
{
byte b = inputBuffer[inputOffset++];
if (this.mode == FromBase64TransformMode.IgnoreWhiteSpaces)
{
if (!char.IsWhiteSpace((char)b))
{
this.accumulator[this.accPtr++] = b;
}
}
else
{
this.accumulator[this.accPtr++] = b;
}
}
if (this.accPtr == 4)
{
num += this.ProcessBlock(outputBuffer, outputOffset);
outputOffset += 3;
this.accPtr = 0;
}
inputCount--;
}
return num;
}
/// <summary>Converts the specified region of the specified byte array from base 64.</summary>
/// <returns>The computed conversion.</returns>
/// <param name="inputBuffer">The input to convert from base 64. </param>
/// <param name="inputOffset">The offset into the byte array from which to begin using data. </param>
/// <param name="inputCount">The number of bytes in the byte array to use as data. </param>
/// <exception cref="T:System.ObjectDisposedException">The current <see cref="T:System.Security.Cryptography.FromBase64Transform" /> object has already been disposed. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="inputBuffer" /> has an invalid offset length.-or-<paramref name="inputCount" /> has an invalid value.</exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="inputOffset" /> is out of range. This parameter requires a non-negative number.</exception>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="inputBuffer" /> is null.</exception>
// Token: 0x06002F4C RID: 12108 RVA: 0x00098634 File Offset: 0x00096834
public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount)
{
if (this.m_disposed)
{
throw new ObjectDisposedException("FromBase64Transform");
}
this.CheckInputParameters(inputBuffer, inputOffset, inputCount);
int num = 0;
int num2 = 0;
if (this.mode == FromBase64TransformMode.IgnoreWhiteSpaces)
{
int num3 = inputOffset;
for (int i = 0; i < inputCount; i++)
{
if (char.IsWhiteSpace((char)inputBuffer[num3]))
{
num++;
}
num3++;
}
if (num == inputCount)
{
return new byte[0];
}
int num4 = inputOffset + inputCount - 1;
int j = Math.Min(2, inputCount);
while (j > 0)
{
char c = (char)inputBuffer[num4--];
if (c == '=')
{
num2++;
j--;
}
else if (!char.IsWhiteSpace(c))
{
break;
}
}
}
else
{
if (inputBuffer[inputOffset + inputCount - 1] == 61)
{
num2++;
}
if (inputBuffer[inputOffset + inputCount - 2] == 61)
{
num2++;
}
}
if (inputCount < 4 && num2 < 2)
{
if (this.accPtr > 2 && this.accumulator[3] == 61)
{
num2++;
}
if (this.accPtr > 1 && this.accumulator[2] == 61)
{
num2++;
}
}
int num5 = (this.accPtr + inputCount - num >> 2) * 3 - num2;
if (num5 <= 0)
{
return new byte[0];
}
byte[] array = new byte[num5];
this.TransformBlock(inputBuffer, inputOffset, inputCount, array, 0);
return array;
}
// Token: 0x0400134B RID: 4939
private const byte TerminatorByte = 61;
// Token: 0x0400134C RID: 4940
private FromBase64TransformMode mode;
// Token: 0x0400134D RID: 4941
private byte[] accumulator;
// Token: 0x0400134E RID: 4942
private int accPtr;
// Token: 0x0400134F RID: 4943
private bool m_disposed;
// Token: 0x04001350 RID: 4944
private byte[] lookupTable;
}
}
@@ -0,0 +1,19 @@
using System;
using System.Runtime.InteropServices;
namespace System.Security.Cryptography
{
/// <summary>Specifies whether white space should be ignored in the base 64 transformation.</summary>
// Token: 0x020004FF RID: 1279
[ComVisible(true)]
[Serializable]
public enum FromBase64TransformMode
{
/// <summary>White space should be ignored.</summary>
// Token: 0x04001349 RID: 4937
IgnoreWhiteSpaces,
/// <summary>White space should not be ignored.</summary>
// Token: 0x0400134A RID: 4938
DoNotIgnoreWhiteSpaces
}
}
@@ -0,0 +1,214 @@
using System;
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// <summary>Represents the abstract class from which all implementations of Hash-based Message Authentication Code (HMAC) must derive.</summary>
// Token: 0x02000501 RID: 1281
[ComVisible(true)]
public abstract class HMAC : KeyedHashAlgorithm
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMAC" /> class. </summary>
// Token: 0x06002F4D RID: 12109 RVA: 0x000987AC File Offset: 0x000969AC
protected HMAC()
{
this._disposed = false;
this._blockSizeValue = 64;
}
/// <summary>Gets or sets the block size to use in the hash value.</summary>
/// <returns>The block size to use in the hash value.</returns>
// Token: 0x17000957 RID: 2391
// (get) Token: 0x06002F4E RID: 12110 RVA: 0x000987C4 File Offset: 0x000969C4
// (set) Token: 0x06002F4F RID: 12111 RVA: 0x000987CC File Offset: 0x000969CC
protected int BlockSizeValue
{
get
{
return this._blockSizeValue;
}
set
{
this._blockSizeValue = value;
}
}
/// <summary>Gets or sets the name of the hash algorithm to use for hashing.</summary>
/// <returns>The name of the hash algorithm.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The current hash algorithm cannot be changed.</exception>
// Token: 0x17000958 RID: 2392
// (get) Token: 0x06002F50 RID: 12112 RVA: 0x000987D8 File Offset: 0x000969D8
// (set) Token: 0x06002F51 RID: 12113 RVA: 0x000987E0 File Offset: 0x000969E0
public string HashName
{
get
{
return this._hashName;
}
set
{
this._hashName = value;
this._algo = HashAlgorithm.Create(this._hashName);
}
}
/// <summary>Gets or sets the key to use in the hash algorithm.</summary>
/// <returns>The key to use in the hash algorithm.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">An attempt is made to change the <see cref="P:System.Security.Cryptography.HMAC.Key" /> property after hashing has begun. </exception>
// Token: 0x17000959 RID: 2393
// (get) Token: 0x06002F52 RID: 12114 RVA: 0x000987FC File Offset: 0x000969FC
// (set) Token: 0x06002F53 RID: 12115 RVA: 0x00098810 File Offset: 0x00096A10
public override byte[] Key
{
get
{
return (byte[])base.Key.Clone();
}
set
{
if (value != null && value.Length > 64)
{
base.Key = this._algo.ComputeHash(value);
}
else
{
base.Key = (byte[])value.Clone();
}
}
}
// Token: 0x1700095A RID: 2394
// (get) Token: 0x06002F54 RID: 12116 RVA: 0x00098858 File Offset: 0x00096A58
internal BlockProcessor Block
{
get
{
if (this._block == null)
{
this._block = new BlockProcessor(this._algo, this.BlockSizeValue >> 3);
}
return this._block;
}
}
// Token: 0x06002F55 RID: 12117 RVA: 0x00098890 File Offset: 0x00096A90
private byte[] KeySetup(byte[] key, byte padding)
{
byte[] array = new byte[this.BlockSizeValue];
for (int i = 0; i < key.Length; i++)
{
array[i] = key[i] ^ padding;
}
for (int j = key.Length; j < this.BlockSizeValue; j++)
{
array[j] = padding;
}
return array;
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.HMAC" /> class when a key change is legitimate and optionally releases the managed resources.</summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x06002F56 RID: 12118 RVA: 0x000988E4 File Offset: 0x00096AE4
protected override void Dispose(bool disposing)
{
if (!this._disposed)
{
base.Dispose(disposing);
}
}
/// <summary>When overridden in a derived class, routes data written to the object into the default <see cref="T:System.Security.Cryptography.HMAC" /> hash algorithm for computing the hash value.</summary>
/// <param name="rgb">The input data. </param>
/// <param name="ib">The offset into the byte array from which to begin using data. </param>
/// <param name="cb">The number of bytes in the array to use as data. </param>
// Token: 0x06002F57 RID: 12119 RVA: 0x000988F8 File Offset: 0x00096AF8
protected override void HashCore(byte[] rgb, int ib, int cb)
{
if (this._disposed)
{
throw new ObjectDisposedException("HMACSHA1");
}
if (this.State == 0)
{
this.Initialize();
this.State = 1;
}
this.Block.Core(rgb, ib, cb);
}
/// <summary>When overridden in a derived class, finalizes the hash computation after the last data is processed by the cryptographic stream object.</summary>
/// <returns>The computed hash code in a byte array.</returns>
// Token: 0x06002F58 RID: 12120 RVA: 0x00098944 File Offset: 0x00096B44
protected override byte[] HashFinal()
{
if (this._disposed)
{
throw new ObjectDisposedException("HMAC");
}
this.State = 0;
this.Block.Final();
byte[] hash = this._algo.Hash;
byte[] array = this.KeySetup(this.Key, 92);
this._algo.Initialize();
this._algo.TransformBlock(array, 0, array.Length, array, 0);
this._algo.TransformFinalBlock(hash, 0, hash.Length);
byte[] hash2 = this._algo.Hash;
this._algo.Initialize();
Array.Clear(array, 0, array.Length);
Array.Clear(hash, 0, hash.Length);
return hash2;
}
/// <summary>Initializes an instance of the default implementation of <see cref="T:System.Security.Cryptography.HMAC" />.</summary>
// Token: 0x06002F59 RID: 12121 RVA: 0x000989F0 File Offset: 0x00096BF0
public override void Initialize()
{
if (this._disposed)
{
throw new ObjectDisposedException("HMAC");
}
this.State = 0;
this.Block.Initialize();
byte[] array = this.KeySetup(this.Key, 54);
this._algo.Initialize();
this.Block.Core(array);
Array.Clear(array, 0, array.Length);
}
/// <summary>Creates an instance of the default implementation of a Hash-based Message Authentication Code (HMAC).</summary>
/// <returns>A new SHA-1 instance, unless the default settings have been changed by using the &lt;cryptoClass&gt; element.</returns>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x06002F5A RID: 12122 RVA: 0x00098A58 File Offset: 0x00096C58
public new static HMAC Create()
{
return HMAC.Create("System.Security.Cryptography.HMAC");
}
/// <summary>Creates an instance of the specified implementation of a Hash-based Message Authentication Code (HMAC).</summary>
/// <returns>A new instance of the specified HMAC implementation.</returns>
/// <param name="algorithmName">The HMAC implementation to use. The following table shows the valid values for the <paramref name="algorithmName" /> parameter and the algorithms they map to.Parameter valueImplements System.Security.Cryptography.HMAC<see cref="T:System.Security.Cryptography.HMACSHA1" />System.Security.Cryptography.KeyedHashAlgorithm<see cref="T:System.Security.Cryptography.HMACSHA1" />HMACMD5<see cref="T:System.Security.Cryptography.HMACMD5" />System.Security.Cryptography.HMACMD5<see cref="T:System.Security.Cryptography.HMACMD5" />HMACRIPEMD160<see cref="T:System.Security.Cryptography.HMACRIPEMD160" />System.Security.Cryptography.HMACRIPEMD160<see cref="T:System.Security.Cryptography. HMACRIPEMD160" />HMACSHA1<see cref="T:System.Security.Cryptography.HMACSHA1" />System.Security.Cryptography.HMACSHA1<see cref="T:System.Security.Cryptography. HMACSHA1" />HMACSHA256<see cref="T:System.Security.Cryptography.HMACSHA256" />System.Security.Cryptography.HMACSHA256<see cref="T:System.Security.Cryptography.HMACSHA256" />HMACSHA384<see cref="T:System.Security.Cryptography.HMACSHA384" />System.Security.Cryptography.HMACSHA384<see cref="T:System.Security.Cryptography.HMACSHA384" />HMACSHA512<see cref="T:System.Security.Cryptography.HMACSHA512" />System.Security.Cryptography.HMACSHA512<see cref="T:System.Security.Cryptography.HMACSHA512" />MACTripleDES<see cref="T:System.Security.Cryptography. MACTripleDES" />System.Security.Cryptography.MACTripleDES<see cref="T:System.Security.Cryptography.MACTripleDES" /></param>
// Token: 0x06002F5B RID: 12123 RVA: 0x00098A64 File Offset: 0x00096C64
public new static HMAC Create(string algorithmName)
{
return (HMAC)CryptoConfig.CreateFromName(algorithmName);
}
// Token: 0x04001351 RID: 4945
private bool _disposed;
// Token: 0x04001352 RID: 4946
private string _hashName;
// Token: 0x04001353 RID: 4947
private HashAlgorithm _algo;
// Token: 0x04001354 RID: 4948
private BlockProcessor _block;
// Token: 0x04001355 RID: 4949
private int _blockSizeValue;
}
}
@@ -0,0 +1,30 @@
using System;
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// <summary>Computes a Hash-based Message Authentication Code (HMAC) using the <see cref="T:System.Security.Cryptography.MD5" /> hash function.</summary>
// Token: 0x02000502 RID: 1282
[ComVisible(true)]
public class HMACMD5 : HMAC
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACMD5" /> class with a randomly generated key.</summary>
// Token: 0x06002F5C RID: 12124 RVA: 0x00098A74 File Offset: 0x00096C74
public HMACMD5()
: this(KeyBuilder.Key(8))
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACMD5" /> class using the supplied key.</summary>
/// <param name="key">The secret key for <see cref="T:System.Security.Cryptography.HMACMD5" /> encryption. The key can be any length, but if it is more than 64 bytes long it will be hashed (using SHA-1) to derive a 64-byte key. Therefore, the recommended size of the secret key is 64 bytes. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is null. </exception>
// Token: 0x06002F5D RID: 12125 RVA: 0x00098A84 File Offset: 0x00096C84
public HMACMD5(byte[] key)
{
base.HashName = "MD5";
this.HashSizeValue = 128;
this.Key = key;
}
}
}
@@ -0,0 +1,30 @@
using System;
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// <summary>Computes a Hash-based Message Authentication Code (HMAC) using the <see cref="T:System.Security.Cryptography.RIPEMD160" /> hash function.</summary>
// Token: 0x02000503 RID: 1283
[ComVisible(true)]
public class HMACRIPEMD160 : HMAC
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACRIPEMD160" /> class with a randomly generated 64-byte key.</summary>
// Token: 0x06002F5E RID: 12126 RVA: 0x00098AAC File Offset: 0x00096CAC
public HMACRIPEMD160()
: this(KeyBuilder.Key(8))
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACRIPEMD160" /> class with the specified key data.</summary>
/// <param name="key">The secret key for <see cref="T:System.Security.Cryptography.HMACRIPEMD160" /> encryption. The key can be any length, but if it is more than 64 bytes long it will be hashed (using SHA-1) to derive a 64-byte key. Therefore, the recommended size of the secret key is 64 bytes.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is null. </exception>
// Token: 0x06002F5F RID: 12127 RVA: 0x00098ABC File Offset: 0x00096CBC
public HMACRIPEMD160(byte[] key)
{
base.HashName = "RIPEMD160";
this.HashSizeValue = 160;
this.Key = key;
}
}
}
@@ -0,0 +1,41 @@
using System;
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// <summary>Computes a Hash-based Message Authentication Code (HMAC) using the <see cref="T:System.Security.Cryptography.SHA1" /> hash function.</summary>
// Token: 0x02000504 RID: 1284
[ComVisible(true)]
public class HMACSHA1 : HMAC
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA1" /> class with a randomly generated key.</summary>
// Token: 0x06002F60 RID: 12128 RVA: 0x00098AE4 File Offset: 0x00096CE4
public HMACSHA1()
: this(KeyBuilder.Key(8))
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA1" /> class with the specified key data.</summary>
/// <param name="key">The secret key for <see cref="T:System.Security.Cryptography.HMACSHA1" /> encryption. The key can be any length, but if it is more than 64 bytes long it will be hashed (using SHA-1) to derive a 64-byte key. Therefore, the recommended size of the secret key is 64 bytes. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is null. </exception>
// Token: 0x06002F61 RID: 12129 RVA: 0x00098AF4 File Offset: 0x00096CF4
public HMACSHA1(byte[] key)
{
base.HashName = "SHA1";
this.HashSizeValue = 160;
this.Key = key;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA1" /> class with the specified key data and a value that specifies whether to use the managed version of the SHA-1 algorithm.</summary>
/// <param name="key">The secret key for <see cref="T:System.Security.Cryptography.HMACSHA1" /> encryption. The key can be any length but if it is more than 64 bytes long, it will be hashed (using SHA-1) to derive a 64-byte key. Therefore, the recommended size of the secret key is 64 bytes.</param>
/// <param name="useManagedSha1">true to use the managed implementation of the SHA-1 algorithm (the <see cref="T:System.Security.Cryptography.SHA1Managed" /> class); false to use the unmanaged implementation (the <see cref="T:System.Security.Cryptography.SHA1CryptoServiceProvider" /> class). </param>
// Token: 0x06002F62 RID: 12130 RVA: 0x00098B1C File Offset: 0x00096D1C
public HMACSHA1(byte[] key, bool useManagedSha1)
{
base.HashName = "System.Security.Cryptography.SHA1" + ((!useManagedSha1) ? "CryptoServiceProvider" : "Managed");
this.HashSizeValue = 160;
this.Key = key;
}
}
}
@@ -0,0 +1,30 @@
using System;
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// <summary>Computes a Hash-based Message Authentication Code (HMAC) using the <see cref="T:System.Security.Cryptography.SHA256" /> hash function.</summary>
// Token: 0x02000505 RID: 1285
[ComVisible(true)]
public class HMACSHA256 : HMAC
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA256" /> class with a randomly generated key.</summary>
// Token: 0x06002F63 RID: 12131 RVA: 0x00098B68 File Offset: 0x00096D68
public HMACSHA256()
: this(KeyBuilder.Key(8))
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA256" /> class with the specified key data.</summary>
/// <param name="key">The secret key for <see cref="T:System.Security.Cryptography.HMACSHA256" /> encryption. The key can be any length, but if it is more than 64 bytes long it will be hashed (using SHA-1) to derive a 64-byte key. Therefore, the recommended size of the secret key is 64 bytes. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is null. </exception>
// Token: 0x06002F64 RID: 12132 RVA: 0x00098B78 File Offset: 0x00096D78
public HMACSHA256(byte[] key)
{
base.HashName = "SHA256";
this.HashSizeValue = 256;
this.Key = key;
}
}
}
@@ -0,0 +1,56 @@
using System;
using System.Runtime.InteropServices;
using Mono.Security.Cryptography;
namespace System.Security.Cryptography
{
/// <summary>Computes a Hash-based Message Authentication Code (HMAC) using the <see cref="T:System.Security.Cryptography.SHA384" /> hash function.</summary>
// Token: 0x02000506 RID: 1286
[ComVisible(true)]
public class HMACSHA384 : HMAC
{
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA384" /> class by using a randomly generated key.</summary>
// Token: 0x06002F65 RID: 12133 RVA: 0x00098BA0 File Offset: 0x00096DA0
public HMACSHA384()
: this(KeyBuilder.Key(8))
{
this.ProduceLegacyHmacValues = HMACSHA384.legacy_mode;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA384" /> class by using the specified key data.</summary>
/// <param name="key">The secret key for <see cref="T:System.Security.Cryptography.HMACSHA384" /> encryption. The key can be any length. However, if it is more than 64 bytes long it will be hashed (using SHA-1) to derive a 64-byte key. Therefore, the recommended size of the secret key is 64 bytes. </param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is null. </exception>
// Token: 0x06002F66 RID: 12134 RVA: 0x00098BBC File Offset: 0x00096DBC
public HMACSHA384(byte[] key)
{
this.ProduceLegacyHmacValues = HMACSHA384.legacy_mode;
base.HashName = "SHA384";
this.HashSizeValue = 384;
this.Key = key;
}
/// <summary>Provides a workaround for the .NET Framework version 2.0 implementation of the <see cref="T:System.Security.Cryptography.HMACSHA384" /> algorithm, which is inconsistent with the .NET Framework version 2.0 Service Pack 1 implementation of the algorithm.</summary>
/// <returns>true to enable .NET Framework version 2.0 Service Pack 1 applications to interact with .NET Framework 2.0 applications; otherwise, false.</returns>
// Token: 0x1700095B RID: 2395
// (get) Token: 0x06002F68 RID: 12136 RVA: 0x00098C14 File Offset: 0x00096E14
// (set) Token: 0x06002F69 RID: 12137 RVA: 0x00098C1C File Offset: 0x00096E1C
public bool ProduceLegacyHmacValues
{
get
{
return this.legacy;
}
set
{
this.legacy = value;
base.BlockSizeValue = ((!this.legacy) ? 128 : 64);
}
}
// Token: 0x04001356 RID: 4950
private static bool legacy_mode = Environment.GetEnvironmentVariable("legacyHMACMode") == "1";
// Token: 0x04001357 RID: 4951
private bool legacy;
}
}

Some files were not shown because too many files have changed in this diff Show More