One way to do this to have have a bit array in which each flag corresponds to a particular module or feature. While generating a license, set the bit array according to the modules that the customer has purchased, then sign this bit array using an algorithm such as RSA. Then, in your software, verify the signature and retrieve the bit array to determine which modules to activate.
Take a look at CryptoLicensing which has support for this very scenario - you can specify upto 2040 features/modules in each generated license.
发布评论
评论(2)
您可以使用现有的开源解决方案之一来生成和验证许可证文件,包括有关允许的模块/功能的信息:
这两个工具都允许您将附加数据存储到许可证文件中 - >在你的情况下允许的模块。
使用 Portable.Licensing 解决方案,您可以使用产品功能或附加许可证数据来添加允许的模块:
要验证模块:
免责声明:我是 Portable.Licensing 开源项目
You can use one of the existing open source solutions to generate and validate license files including information about allowed modules/features:
Boths tools allow you to store additional data to the license file -> in your case the allowed modules.
Using the Portable.Licensing solution you can use product features or additional license data to add the allowed modules:
To verify the modules:
DISCLAIMER: i'm the author of the Portable.Licensing open source project
实现此目的的一种方法是拥有一个位数组,其中每个标志对应于一个特定的模块或功能。生成License时,根据客户购买的模块设置位数组,然后使用RSA等算法对该位数组进行签名。然后,在您的软件中,验证签名并检索位数组以确定要激活哪些模块。
看一下 CryptoLicensing,它支持这种场景 - 您最多可以指定 2040 个功能每个生成的许可证中的 /modules。
One way to do this to have have a bit array in which each flag corresponds to a particular module or feature. While generating a license, set the bit array according to the modules that the customer has purchased, then sign this bit array using an algorithm such as RSA. Then, in your software, verify the signature and retrieve the bit array to determine which modules to activate.
Take a look at CryptoLicensing which has support for this very scenario - you can specify upto 2040 features/modules in each generated license.