Language: Go
Label: vulnerable
CWE: NVD-CWE-noinfo \u2014 

Code:
func initWithRegionMagic(regionMagic string) {
	if regionMagic == "" {
		log.Warn("no region magic setting, using default secret keys for checksum")
		return
	}

	log.Info("using magic secret keys for checksum with:", regionMagic)
	b := sha1.Sum([]byte(regionMagic))
	initTokenSecret(b[:8])
	initLocationSecret(b[:8])
}