anchor.diff:              Hash = case Password of
                   <<>> -> CurrentPasswordHash;
                   _Else ->
  -                    H = couch_util:encodeBase64(crypto:sha(<<UserSalt/binary, Password/binary>>)),
  +                    H = hash_password(Password, UserSalt),
                       H
                   end,
               Hash;
  
positive.code:     AuthorizationHeader = header_value(Req, "Authorization"),
      case AuthorizationHeader of
      "Basic " ++ Base64Value ->
          io:format("~n~nBase64Value: '~p'~n~n", [Base64Value]),
          case string:tokens(?b2l(couch_util:decodeBase64(Base64Value)),":") of
          [User, Pass] ->
              {User, Pass};
  
negative.code:         Result -> Result
      end,
      UserSalt = proplists:get_value(<<"salt">>, User, <<>>),
      PasswordHash = hash_password(Password, UserSalt),
      case proplists:get_value(<<"password_sha">>, User, nil) of
          ExpectedHash when ExpectedHash == PasswordHash ->
              Secret = ?l2b(couch_config:get("couch_httpd_auth", "secret", nil)),
  