Esempio n. 1
0
 private static int AccessMaskFromRights(System.Security.AccessControl.CryptoKeyRights cryptoKeyRights, AccessControlType controlType)
 {
     if (controlType == AccessControlType.Allow)
     {
         cryptoKeyRights |= System.Security.AccessControl.CryptoKeyRights.Synchronize;
     }
     else
     {
         if (controlType != AccessControlType.Deny)
         {
             throw new ArgumentException(Environment.GetResourceString("Argument_InvalidEnumValue", new object[] { controlType, "controlType" }), "controlType");
         }
         if (cryptoKeyRights != System.Security.AccessControl.CryptoKeyRights.FullControl)
         {
             cryptoKeyRights &= ~System.Security.AccessControl.CryptoKeyRights.Synchronize;
         }
     }
     return((int)cryptoKeyRights);
 }
Esempio n. 2
0
 public CryptoKeyAccessRule(IdentityReference identity, System.Security.AccessControl.CryptoKeyRights cryptoKeyRights, AccessControlType type) : this(identity, AccessMaskFromRights(cryptoKeyRights, type), false, InheritanceFlags.None, PropagationFlags.None, type)
 {
 }
 public CryptoKeyAuditRule(IdentityReference identity, System.Security.AccessControl.CryptoKeyRights cryptoKeyRights, AuditFlags flags) : this(identity, AccessMaskFromRights(cryptoKeyRights), false, InheritanceFlags.None, PropagationFlags.None, flags)
 {
 }
Esempio n. 4
0
 public CryptoKeyAccessRule(string identity, System.Security.AccessControl.CryptoKeyRights cryptoKeyRights, AccessControlType type) : this(new NTAccount(identity), AccessMaskFromRights(cryptoKeyRights, type), false, InheritanceFlags.None, PropagationFlags.None, type)
 {
 }
 private static int AccessMaskFromRights(System.Security.AccessControl.CryptoKeyRights cryptoKeyRights)
 {
     return((int)cryptoKeyRights);
 }