anchor.diff:              CHashLabel
       end.
   
  -%% ====================================================================
  -%% Internal functions
  -%% ====================================================================
  -
  -%%--------------------------------------------------------------------
  -%% @private
  -%% @doc
  -%% Generates a datastore key based on provided seed and other datastore key
  -%% according to the procedure that was used in versions pre 19.02.1.
  -%% NOTE: Should only be used in code that requires retaining the legacy ids.
  -%% In other cases, new_from_digest/1 should be used.
  -%% @end
  -%%--------------------------------------------------------------------
  --spec gen_legacy_key(binary(), key()) -> key().
  -gen_legacy_key(Seed, Key) ->
  -    digest([Seed, Key]).
  -
  -
  -%% @private
  --spec digest(digest_components()) -> binary().
  -digest(DigestComponents) ->
  -    str_utils:md5_digest(DigestComponents).
  -
  -
  -%% @private
  +
   -spec concatenate_chash_label(key(), chash_label()) -> key().
   concatenate_chash_label(BasicKey, CHashLabel) ->
       <<BasicKey/binary, ?CHASH_LABEL_SEPARATOR, CHashLabel/binary>>.
   
   
  -%% @private
   -spec to_basic_key_and_chash_label(key()) -> {key(), undefined | chash_label()}.
   to_basic_key_and_chash_label(Key) ->
       BasicKeyLength = byte_size(Key) - ?CHASH_LABEL_SEPARATOR_SIZE - ?CHASH_LABEL_CHARS,
  
positive.code: -export([new/0, new_from_digest/1]).
  -export([new_adjacent_to/1, build_adjacent/2, adjacent_from_digest/2]).
  -export([any_responsible_node/1, primary_responsible_node/1, get_chash_seed/1]).
  
  %%%===================================================================
  %%% API
  
negative.code:             {BasicKey, CHashLabel};
          _ ->
              {Key, undefined}
      end.
  
  %% ====================================================================
  %% Internal functions
  %% ====================================================================
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Generates a datastore key based on provided seed and other datastore key
  %% according to the procedure that was used in versions pre 19.02.1.
  %% NOTE: Should only be used in code that requires retaining the legacy ids.
  %% In other cases, new_from_digest/1 should be used.
  %% @end
  %%--------------------------------------------------------------------
  -spec gen_legacy_key(binary(), key()) -> key().
  gen_legacy_key(Seed, Key) ->
      digest([Seed, Key]).
  
  
  %% @private
  -spec digest(digest_components()) -> binary().
  digest(DigestComponents) ->
      str_utils:md5_digest(DigestComponents).
  