An example of how to verify/activate licenses without access to the internet. In the end of the tutorial, an example is shown on how to to create a license file, aka activation file or certificate. Such a file can be used by your clients to verify a license offline.
The reason why we had to include your RSA public key in the Key Verification tutorial was to verify the signature provided by Cryptolens.So, to be able to verify licenses offline, all you have to do is to provide your customers with this response/certificate. There are many different ways of setting this up, which we have outlined below:
3
passed as a parameter to HasValidSignature
(in .NET) or LoadFromString
(in Java) is used to specify the expiration date of the license file. In this case, users can only be offline for at most 3 days until they need to reconnect again.SaveToFile
and LoadFromFile
, which are useful abstractions so that you do need to worry about serialization and storage. In some cases, it can be useful to store the LicenseKey
in some other way. In that case, you just to need serialize the LicenseKey
object. You can also use settings variables.
365
as a parameter to HasValidSignature
(in .NET) or LoadFromString
(in Java). This is used to ensure that users need to update the license file becomes invalid in 365 days, requiring the users to obtain a new license file.
IsOnRightMachine()
call.