using System; using System.Runtime.InteropServices; using System.Security.Cryptography; namespace System.Security.Permissions { /// Specifies access rights for specific key containers. This class cannot be inherited. // Token: 0x02000555 RID: 1365 [ComVisible(true)] [Serializable] public sealed class KeyContainerPermissionAccessEntry { /// Initializes a new instance of the class, using the specified cryptographic service provider (CSP) parameters and access permissions. /// A object that contains the cryptographic service provider (CSP) parameters. /// A bitwise combination of the values. /// The resulting entry would have unrestricted access. // Token: 0x060031D7 RID: 12759 RVA: 0x000AB594 File Offset: 0x000A9794 public KeyContainerPermissionAccessEntry(CspParameters parameters, KeyContainerPermissionFlags flags) { if (parameters == null) { throw new ArgumentNullException("parameters"); } this.ProviderName = parameters.ProviderName; this.ProviderType = parameters.ProviderType; this.KeyContainerName = parameters.KeyContainerName; this.KeySpec = parameters.KeyNumber; this.Flags = flags; } /// Initializes a new instance of the class, using the specified key container name and access permissions. /// The name of the key container. /// A bitwise combination of the values. /// The resulting entry would have unrestricted access. // Token: 0x060031D8 RID: 12760 RVA: 0x000AB5F0 File Offset: 0x000A97F0 public KeyContainerPermissionAccessEntry(string keyContainerName, KeyContainerPermissionFlags flags) { this.KeyContainerName = keyContainerName; this.Flags = flags; } /// Initializes a new instance of the class with the specified property values. /// The name of the key store. /// The name of the provider. /// The type code for the provider. See the property for values. /// The name of the key container. /// The key specification. See the property for values. /// A bitwise combination of the values. /// The resulting entry would have unrestricted access. // Token: 0x060031D9 RID: 12761 RVA: 0x000AB608 File Offset: 0x000A9808 public KeyContainerPermissionAccessEntry(string keyStore, string providerName, int providerType, string keyContainerName, int keySpec, KeyContainerPermissionFlags flags) { this.KeyStore = keyStore; this.ProviderName = providerName; this.ProviderType = providerType; this.KeyContainerName = keyContainerName; this.KeySpec = keySpec; this.Flags = flags; } /// Gets or sets the key container permissions. /// A bitwise combination of the values. The default is . // Token: 0x170009C0 RID: 2496 // (get) Token: 0x060031DA RID: 12762 RVA: 0x000AB648 File Offset: 0x000A9848 // (set) Token: 0x060031DB RID: 12763 RVA: 0x000AB650 File Offset: 0x000A9850 public KeyContainerPermissionFlags Flags { get { return this._flags; } set { if ((value & KeyContainerPermissionFlags.AllFlags) != KeyContainerPermissionFlags.NoFlags) { string text = string.Format(Locale.GetText("Invalid enum {0}"), value); throw new ArgumentException(text, "KeyContainerPermissionFlags"); } this._flags = value; } } /// Gets or sets the key container name. /// The name of the key container. /// The resulting entry would have unrestricted access. // Token: 0x170009C1 RID: 2497 // (get) Token: 0x060031DC RID: 12764 RVA: 0x000AB694 File Offset: 0x000A9894 // (set) Token: 0x060031DD RID: 12765 RVA: 0x000AB69C File Offset: 0x000A989C public string KeyContainerName { get { return this._containerName; } set { this._containerName = value; } } /// Gets or sets the key specification. /// One of the AT_ values defined in the Wincrypt.h header file. /// The resulting entry would have unrestricted access. // Token: 0x170009C2 RID: 2498 // (get) Token: 0x060031DE RID: 12766 RVA: 0x000AB6A8 File Offset: 0x000A98A8 // (set) Token: 0x060031DF RID: 12767 RVA: 0x000AB6B0 File Offset: 0x000A98B0 public int KeySpec { get { return this._spec; } set { this._spec = value; } } /// Gets or sets the name of the key store. /// The name of the key store. /// The resulting entry would have unrestricted access. // Token: 0x170009C3 RID: 2499 // (get) Token: 0x060031E0 RID: 12768 RVA: 0x000AB6BC File Offset: 0x000A98BC // (set) Token: 0x060031E1 RID: 12769 RVA: 0x000AB6C4 File Offset: 0x000A98C4 public string KeyStore { get { return this._store; } set { this._store = value; } } /// Gets or sets the provider name. /// The name of the provider. /// The resulting entry would have unrestricted access. // Token: 0x170009C4 RID: 2500 // (get) Token: 0x060031E2 RID: 12770 RVA: 0x000AB6D0 File Offset: 0x000A98D0 // (set) Token: 0x060031E3 RID: 12771 RVA: 0x000AB6D8 File Offset: 0x000A98D8 public string ProviderName { get { return this._providerName; } set { this._providerName = value; } } /// Gets or sets the provider type. /// One of the PROV_ values defined in the Wincrypt.h header file. /// The resulting entry would have unrestricted access. // Token: 0x170009C5 RID: 2501 // (get) Token: 0x060031E4 RID: 12772 RVA: 0x000AB6E4 File Offset: 0x000A98E4 // (set) Token: 0x060031E5 RID: 12773 RVA: 0x000AB6EC File Offset: 0x000A98EC public int ProviderType { get { return this._type; } set { this._type = value; } } /// Determines whether the specified object is equal to the current instance. /// true if the specified is equal to the current object; otherwise, false. /// The object to compare with the currentinstance. // Token: 0x060031E6 RID: 12774 RVA: 0x000AB6F8 File Offset: 0x000A98F8 public override bool Equals(object o) { if (o == null) { return false; } KeyContainerPermissionAccessEntry keyContainerPermissionAccessEntry = o as KeyContainerPermissionAccessEntry; return keyContainerPermissionAccessEntry != null && this._flags == keyContainerPermissionAccessEntry._flags && !(this._containerName != keyContainerPermissionAccessEntry._containerName) && !(this._store != keyContainerPermissionAccessEntry._store) && !(this._providerName != keyContainerPermissionAccessEntry._providerName) && this._type == keyContainerPermissionAccessEntry._type; } /// Gets a hash code for the current instance that is suitable for use in hashing algorithms and data structures such as a hash table. /// A hash code for the current object. // Token: 0x060031E7 RID: 12775 RVA: 0x000AB78C File Offset: 0x000A998C public override int GetHashCode() { int num = this._type ^ this._spec ^ (int)this._flags; if (this._containerName != null) { num ^= this._containerName.GetHashCode(); } if (this._store != null) { num ^= this._store.GetHashCode(); } if (this._providerName != null) { num ^= this._providerName.GetHashCode(); } return num; } // Token: 0x04001474 RID: 5236 private KeyContainerPermissionFlags _flags; // Token: 0x04001475 RID: 5237 private string _containerName; // Token: 0x04001476 RID: 5238 private int _spec; // Token: 0x04001477 RID: 5239 private string _store; // Token: 0x04001478 RID: 5240 private string _providerName; // Token: 0x04001479 RID: 5241 private int _type; } }