func deriveSigningKey()

in sigv4/internal/crypt.go [80:89]


func deriveSigningKey(secret string, t time.Time, region string) []byte {
	// we successively apply the hmac secret in multiple iterations rather then simply
	// write it once (as per the Amazon Keyspaces protocol)
	s := "AWS4" + secret
	h := applyHmac(toCredDateStamp(t), []byte(s))
	h = applyHmac(region, h)
	h = applyHmac("cassandra", h)
	h = applyHmac("aws4_request", h)
	return h
}