anchor.diff:      Hostname = proplists:get_value("hostname", Params),
       Username = proplists:get_value("username", Params),
       Password = proplists:get_value("password", Params),
  +    DemandEncryption = proplists:get_value("demandEncryption", Params, "0"),
  +    Cert = proplists:get_value("certificate", Params, ""),
       NameError = case check_nonempty(Name, <<"name">>, <<"cluster name">>) of
                       X when is_tuple(X) -> X;
                       _ ->
  
positive.code:                     end,
      UsernameError = check_nonempty(Username, <<"username">>, <<"username">>),
      PasswordError = check_nonempty(Password, <<"password">>, <<"password">>),
      Errors0 = lists:filter(fun (undefined) -> false;
                                (_) -> true
                            end, [NameError, HostnameError, UsernameError, PasswordError]),
      Errors = case lists:any(fun (KV) ->
                                      lists:keyfind(name, 1, KV) =:= {name, Name} andalso
                                          proplists:get_value(deleted, KV, false) =:= false
  
negative.code:              end,
      case Errors of
          [] ->
              BaseKVList = [{name, Name},
                            {hostname, Hostname},
                            {username, Username},
                            {password, Password}],
              KVList = case DemandEncryption of
                           "0" ->
                               BaseKVList;
                           _ ->
                               [{cert, list_to_binary(Cert)} | BaseKVList]
                       end,
              {ok, KVList};
          _ ->
              {errors, Errors}
      end.
  