zhangzengfei
2021-11-08 cd769ea498c08d5742b444fe6451b4c22899a317
README.md
@@ -8,9 +8,10 @@
)
func main() {
   // 生成秘钥和公钥
   // 生成秘钥和公钥, 参数: 文件前缀
   if len(os.Args) > 1 && os.Args[1] == "-g" {
      licence.GetRsaKey()
      licence.GetRsaKey("test")
      return
   }
@@ -54,6 +55,9 @@
   // 验证Licence, 参数: LicenceFile, public.pem 的路径 返回: 0, 成功 1, 无效 2, 设备未授权 3, 过期
   fmt.Println(licence.VerifyLicence("./LicenceFile", "./public.pem"))
   // 获取授权通道数
   fmt.Println(licence.ReadGrantChannels("./LicenceFile", "./dev-public.pem"))
}
```