package crypter import ( "crypto/hmac" "fmt" "golang.org/x/crypto/ripemd160" ) func EncryptedToken(token, key string) string { h2 := hmac.New(ripemd160.New, []byte(key)) h2.Write([]byte(token)) hashBytes := h2.Sum(nil) hashString := fmt.Sprintf("%x", hashBytes) return hashString }