anchor.diff:              false
       end.
   
  -%% @doc Generate the canonical id for a user.
  --spec generate_canonical_id(string(), string()) -> string().
  -generate_canonical_id(KeyID, Secret) ->
  -    Bytes = 16,
  -    Id1 = crypto:md5(KeyID),
  -    Id2 = crypto:md5(Secret),
  -    binary_to_hexlist(
  -      iolist_to_binary(<< Id1:Bytes/binary,
  -                          Id2:Bytes/binary >>)).
  -
  -%% @doc Generate an access key for a user
  --spec generate_key(binary()) -> string().
  -generate_key(UserName) ->
  -    Ctx = crypto:hmac_init(sha, UserName),
  -    Ctx1 = crypto:hmac_update(Ctx, druuid:v4()),
  -    Key = crypto:hmac_final_n(Ctx1, 15),
  -    string:to_upper(base64:encode_to_string(Key)).
  -
  -%% @doc Generate a secret access token for a user
  --spec generate_secret(binary(), string()) -> string().
  -generate_secret(UserName, Key) ->
  -    Bytes = 14,
  -    Ctx = crypto:hmac_init(sha, UserName),
  -    Ctx1 = crypto:hmac_update(Ctx, list_to_binary(Key)),
  -    SecretPart1 = crypto:hmac_final_n(Ctx1, Bytes),
  -    Ctx2 = crypto:hmac_init(sha, UserName),
  -    Ctx3 = crypto:hmac_update(Ctx2, druuid:v4()),
  -    SecretPart2 = crypto:hmac_final_n(Ctx3, Bytes),
  -    base64:encode_to_string(
  -      iolist_to_binary(<< SecretPart1:Bytes/binary,
  -                          SecretPart2:Bytes/binary >>)).
  -
  -%% @doc Determine if an existing bucket from the resolution list
  -%% should be kept or replaced when a conflict occurs.
  --spec keep_existing_bucket(moss_bucket(), moss_bucket()) -> boolean().
  -keep_existing_bucket(?MOSS_BUCKET{last_action=LastAction1,
  -                                  modification_time=ModTime1},
  -                     ?MOSS_BUCKET{last_action=LastAction2,
  -                                  modification_time=ModTime2}) ->
  -    if
  -        LastAction1 == LastAction2
  -        andalso
  -        ModTime1 =< ModTime2 ->
  -            true;
  -        LastAction1 == LastAction2 ->
  -            false;
  -         ModTime1 > ModTime2 ->
  -            true;
  -        true ->
  -            false
  -    end.
  -
   %% @doc Process the top-level elements of the
   -spec process_xml_error([xmlElement()]) -> string().
   process_xml_error([]) ->
  
positive.code:         _ ->
              process_xml_error(RestElements)
      end.
  
  %% @doc Resolve the set of buckets for a user when
  %% siblings are encountered on a read of a user record.
  
negative.code:             Error
      end.
  
  %% @doc Generate the canonical id for a user.
  -spec generate_canonical_id(string(), string()) -> string().
  generate_canonical_id(KeyID, Secret) ->
      Bytes = 16,
      Id1 = crypto:md5(KeyID),
      Id2 = crypto:md5(Secret),
      binary_to_hexlist(
        iolist_to_binary(<< Id1:Bytes/binary,
                            Id2:Bytes/binary >>)).
  
  %% @doc Generate an access key for a user
  -spec generate_key(binary()) -> string().
  generate_key(UserName) ->
      Ctx = crypto:hmac_init(sha, UserName),
      Ctx1 = crypto:hmac_update(Ctx, druuid:v4()),
      Key = crypto:hmac_final_n(Ctx1, 15),
      string:to_upper(base64:encode_to_string(Key)).
  
  %% @doc Generate a secret access token for a user
  -spec generate_secret(binary(), string()) -> string().
  generate_secret(UserName, Key) ->
      Bytes = 14,
      Ctx = crypto:hmac_init(sha, UserName),
      Ctx1 = crypto:hmac_update(Ctx, list_to_binary(Key)),
      SecretPart1 = crypto:hmac_final_n(Ctx1, Bytes),
      Ctx2 = crypto:hmac_init(sha, UserName),
      Ctx3 = crypto:hmac_update(Ctx2, druuid:v4()),
      SecretPart2 = crypto:hmac_final_n(Ctx3, Bytes),
      base64:encode_to_string(
        iolist_to_binary(<< SecretPart1:Bytes/binary,
                            SecretPart2:Bytes/binary >>)).
  
  %% @doc Determine if an existing bucket from the resolution list
  %% should be kept or replaced when a conflict occurs.
  