94 func generateSign(data, key []byte) string {
95 mac := hmac.New(sha1.New, key)
96 mac.Write(data)
97 expectedMAC := mac.Sum(nil)
98 return base64.StdEncoding.EncodeToString(expectedMAC)
99 }
signature := generateSign([]byte(data), []byte("123"))