in cassandra_sigv4/auth.py [0:0]
def _generate_signature(nonce, request_timestamp, credentials, region):
credentials_scope_date = _format_datestamp(request_timestamp)
signing_scope = _generate_scope(credentials_scope_date, region)
canonical_request = _generate_canonical_request(credentials.access_key, signing_scope,
request_timestamp, nonce)
string_to_sign = "{0}\n{1}\n{2}\n{3}".format(_AWS4_SIGNING_ALGORITHM,
_format_timestamp(request_timestamp),
signing_scope,
_sha_256_hash(canonical_request))
signing_key = _generate_signing_key(credentials.secret_key, credentials_scope_date, region,
_CANONICAL_SERVICE)
return _sha_256_hmac(signing_key, string_to_sign, hex_result=True)