anchor.diff:  create_user(UserName) ->
       case riak_connection() of
           {ok, RiakPid} ->
  -            %% TODO: Is it outside the scope
  -            %% of this module for this func
  -            %% to be making up the key/secret?
  -            KeyID = unique_hex_id(),
  -            Secret = unique_hex_id(),
  -
  +            {KeyID, Secret} = generate_access_creds(UserName),
               User = #moss_user{name=UserName, key_id=KeyID, key_secret=Secret},
               save_user(User, RiakPid),
               close_riak_connection(RiakPid),
  
positive.code:          put_object/4,
           riak_connection/0,
           riak_connection/2,
           to_bucket_name/2,
           unique_hex_id/0]).
  
  -include("riak_moss.hrl").
  
  
negative.code: to_bucket_name(blocks, Name) ->
      <<?BLOCK_BUCKET_PREFIX/binary, Name/binary>>.
  
  %% ===================================================================
  %% Internal functions
  %% ===================================================================
  
  %% @doc Generate a new set of access credentials for user.
  -spec generate_access_creds(string()) -> {binary(), binary()}.
  generate_access_creds(UserName) ->
      BinUser = list_to_binary(UserName),
      KeyID = generate_key(BinUser),
      Secret = generate_secret(BinUser, KeyID),
      {KeyID, Secret}.
  
  %% @doc Retrieve a MOSS user's information based on their id string.
  -spec get_user(string(), pid()) -> {ok, term()} | {error, term()}.
  