醉美猴王
2017-10-11 12:00:52
原
使用truelicense实现用于JAVA工程license机制
开发的软件产品在交付使用的时候,往往会授权一段时间的试用期,这个时候license就派上用场了。不同于在代码中直接加上时间约束,需要重新授权的时候使用license可以避免修改源码,改动部署,授权方直接生成一个新的license发送给使用方替换掉原来的license文件即可。下面将讲述使用truelicense来实现license的生成和使用。Truelicense是一个开源的证书管理引擎,详细介绍见https://truelicense.java.net/
一、首先介绍下license授权机制的原理:
1、 生成密钥对,方法有很多。
2、 授权者保留私钥,使用私钥对包含授权信息(如使用截止日期,MAC地址等)的license进行数字签名。
3、 公钥给使用者(放在验证的代码中使用),用于验证license是否符合使用条件。
网上找了一个例子写好一年多了,今天看牛牛上没有这类项目,分享一下啊
具体的操作可阅读:http://blog.csdn.net/u011229848/article/details/78201292
猜你喜欢
- springMVC+springSecurity3.x+Mybaits3.x旧版蓝缘后台管理系统源代码下载
- java开源图片框架Thumbnailator对图片各种处理的方法(可做到对原图片压缩仅改变大小)
- java开源数据挖掘工具weka例子代码分享
- PPM java开源缺陷管理系统V1.5
- java开源cms管理系统框架-PublicCMS后台管理系统
- 基于servlet实现的ireport报表实例
- 【猪猪-后端】WebMagic框架搭建的爬虫,根据自定义规则,直接抓取,使用灵活,Demo部署即可查看。
- java开源CMS管理系统jeetemp
- java通过MVC开发模式实现后台管理通用设计,对于新手有参考作用
- java开源模板引擎velocity入门基础demo教程
- 部署在Openshift云主机的Java开源论坛XLineCode
- java开源微博系统weibo4j分享
请下载代码后再发表评论
文件名:LicenseVerify.zip,文件大小:919.66K
下载
- /
- /LicenseCreate
- /LicenseCreate/src
- /LicenseCreate/src/cn
- /LicenseCreate/src/cn/melina
- /LicenseCreate/src/cn/melina/license
- /LicenseCreate/src/cn/melina
- /LicenseCreate/src/cn
- /LicenseCreate/src
- /LicenseVerify
- /LicenseVerify/.classpath
- /LicenseVerify/.project
- /LicenseVerify/.settings
- /LicenseVerify/.settings/org.eclipse.core.resources.prefs
- /LicenseVerify/.settings/org.eclipse.jdt.core.prefs
- /LicenseVerify/bigdata.lic
- /LicenseVerify/bin
- /LicenseVerify/bin/cn
- /LicenseVerify/bin/cn/.DS_Store
- /LicenseVerify/bin/cn/melina
- /LicenseVerify/bin/cn/melina/.DS_Store
- /LicenseVerify/bin/cn/melina/license
- /LicenseVerify/bin/cn/melina/license/LicenseManagerHolder.class
- /LicenseVerify/bin/cn/melina/license/licenseVerifyTest.class
- /LicenseVerify/bin/cn
- /LicenseVerify/src
- /LicenseVerify/src/cn
- /LicenseVerify/src/cn/melina
- /LicenseVerify/src/cn
- /LicenseCreate


微信网友_6174112425660416 LV1
2022年10月15日
yufadashen LV3
2020年11月16日
huweinan03 LV1
2020年10月20日
ycr202008 LV1
2020年5月24日
123456781qaz LV2
2019年12月24日
Lee240603372 LV1
2019年10月25日
rongxinhui LV8
2019年8月31日
zzyyyyyy LV1
2019年7月8日
alang94 LV5
2019年5月22日
ftlgood LV1
2019年1月18日

kenhomeliu LV29
2024年4月30日
80730176 LV7
2023年3月9日
青梅论酒 LV9
2023年2月14日
微信网友_6174112425660416 LV1
2022年10月13日
wwwbl123 LV2
2022年3月18日
陈箫goddess LV16
2021年12月28日
maixiaomai LV6
2021年3月26日
bfh365
2021年3月18日
暂无贡献等级
张洪燕
2021年3月17日
暂无贡献等级
xhmpmail LV17
2021年2月24日