Introduce a helper class encapsulating the temp URL HMAC computation,
and also save it for later computation. Use the underlying HMACSHA1
implementation to compute the HMAC incrementally (saves a copy of all
the parameters).
Also avoid some other string copying in the logic prior to taking the
HMAC, in one case by remembering to use auto& in a std::map range-for
loop, and using boost::string_ref to share ReqState::request_uri and
conditionally suffix of same.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
Conflicts:
src/rgw/rgw_swift.cc