From 351d2832f1b4a7b79a97c2681f6d12c761cc9bb8 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期一, 18 十一月 2019 18:31:30 +0800
Subject: [PATCH] fix: take key pamar on Verify licence

---
 licence.go |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/licence.go b/licence.go
index ab955be..6469996 100644
--- a/licence.go
+++ b/licence.go
@@ -10,8 +10,6 @@
 	"github.com/shirou/gopsutil/host"
 )
 
-const key = "flzxsqc,ysyhljt."
-
 type Licence struct {
 	MachineCode string
 	Expires     int64
@@ -61,7 +59,7 @@
 	return AESEncodeStr(json, key)
 }
 
-func VerifyLicence(licenceCode string) uint32 {
+func VerifyLicence(licenceCode, key string) uint32 {
 	decodeData := AESDecodeStr(licenceCode, key)
 	if decodeData == nil {
 		return ValidationErrorMalformed

--
Gitblit v1.8.0