Documentation ¶
Index ¶
- Constants
- func Bin2Hex(bin string) (string, error)
- func CreateActivationCode(machinecode string, date string, param string, fixedcode string) (string, error)
- func DecryptDate(encryptedDate string) (string, error)
- func EncryptDate(date string) (string, error)
- func GetCheckCode(fixedcode string, date string, param string) (string, error)
- func GetMachineCode(fixedcode string) string
- func Hex2Bin(hex string) (string, error)
- type Parameters
Constants ¶
View Source
const ( // 月 "123456789XAB" 分别代表 1-12月 MonthEnum = "123456789XAB" // 日 "123456789ABCDEFGHJKMNPQRSTUVWXY" 分别代表 1-31 日 DayEnum = "123456789ABCDEFGHJKMNPQRSTUVWXY" // 日期显示格式 DateFormat = "2006-01-02" )
Variables ¶
This section is empty.
Functions ¶
func CreateActivationCode ¶ added in v0.1.2
func CreateActivationCode(machinecode string, date string, param string, fixedcode string) (string, error)
获取激活码
func GetCheckCode ¶ added in v0.1.2
获取校验码
Types ¶
type Parameters ¶ added in v0.1.5
type Parameters struct { Testing bool // true:测试版 false:正式版 UseQRCode bool // true:强制使用玻片二维码 UseQRCodeCount int // 允许使用二维码的次数 AllowBM bool // true:允许BM AllowPB bool // true:允许PB }
func CheckActivationCode ¶ added in v0.1.2
func CheckActivationCode(activationCode string, fixedcode string) (status bool, date string, parameters Parameters, err error)
验证激活码
input: activationcode: 激活码 fixedcode: 固定码 output: status: 激活状态 date: 到期日期 parameters: 参数 err: 异常信息
Click to show internal directories.
Click to hide internal directories.