/// <summary>
 /// <para>Generates Digest ACL for given <paramref name="login"/> and <paramref name="plainTextPassword"/>.</para>
 /// </summary>
 public static Acl Digest(AclPermissions permissions, string login, string plainTextPassword)
 {
     using (var sha = new SHA1Managed())
     {
         var loginPasswordString = $"{login}:{plainTextPassword}";
         var hash   = sha.ComputeHash(Encoding.UTF8.GetBytes(loginPasswordString));
         var digest = Convert.ToBase64String(hash);
         var id     = new AclId(AclSchemes.Digest, $"{login}:{digest}");
         return(new Acl(permissions, id));
     }
 }
 public Acl(AclPermissions permissions, [NotNull] AclId id)
 {
     Permissions = permissions;
     Id          = id;
 }