func CreateAuthToken(name, salt, secret string, time int64) string {
	if secret == "" {
		panic("secret must be set")
	}
	if salt == "" {
		panic("salt must be set")
	}
	sessionData := fmt.Sprintf("%s:%X", name, time)
	h := hmac.New(sha1.New, []byte(secret+salt))
	_, _ = h.Write([]byte(sessionData))
	hashData := string(h.Sum(nil))
	return base64.RawURLEncoding.EncodeToString([]byte(sessionData + ":" + hashData))
}
// CreateAuthToken hashes a username, salt, timestamp, and the server secret
// into an authentication token.
CreateAuthToken hashes a username, salt, timestamp, and the server secret
into an authentication token.
// CreateAuthToken hashes a username salt timestamp and the server secret // into an authentication token .
func CreateAuthToken(name, salt, secret string, time int64) string {
	if secret == "" {
		panic("secret must be set")
	}
	if salt == "" {
		panic("salt must be set")
	}
	sessionData := fmt.Sprintf("%s:%X", name, time)
	h := hmac.New(sha1.New, []byte(secret+salt))
	_, _ = h.Write([]byte(sessionData))
	hashData := string(h.Sum(nil))
	return base64.RawURLEncoding.EncodeToString([]byte(sessionData + ":" + hashData))
}
func CreateAuthToken ( name , salt , secret string , time int64 ) string { if secret == " " { panic ( " " ) } if salt == " " { panic ( " " ) } sessionData := fmt . Sprintf ( " " , name , time ) h := hmac . New ( sha1 . New , [ ] byte ( secret + salt ) ) _ , _ = h . Write ( [ ] byte ( sessionData ) ) hashData := string ( h . Sum ( nil ) ) return base64 . RawURLEncoding . EncodeToString ( [ ] byte ( sessionData + " " + hashData ) ) }
CreateAuthToken hashes a username, salt, timestamp, and the server secret
into an authentication token.
CreateAuthToken hashes a username salt timestamp and the server secret into an authentication token .