gpt4 book ai didi

java - 激活码

转载 作者:行者123 更新时间:2023-12-01 15:58:25 25 4
gpt4 key购买 nike

我不确定该问题的标题应该是什么,但我在这里寻求帮助。

我在一家公司工作,该公司在 CORE JAVA 平台上制作基于桌面的应用程序。我们提供激活码来激活我们的软件。激活的概念是——

User enters the Activation code --> software hits our server and download all the required files --> activation completed.

Once in a day, our software hits our server to check if the activation code has been expired.

问题-我们有一个没有常规互联网连接的新客户。不知何故,他们同意提供一次互联网连接-

User enters the Activation code --> software hits our server and download all the required files --> activation completed.

but after that no internet connection. I can stop the software to check with server about expiry Date of activation code. But the problem with me is-

1) How do I check whether the Activation code has actually expired? ( Activation code is valid for 1 year only)

2) If after expiry If user enters a new Activation code, how do I check this is a valid activation code with 1 year validity?

最佳答案

1) 您可以存储注册日期并将其与系统日期进行比较。当然,用户可以调整日期。我曾经有一些软件总是存储它看到的最后一个日期,如果有人将日期移到过去,它就会提示并过期。你可以做这样的事情,但当然它永远不会像与服务器交谈那么安全。

2) 为您的激活 key 创建一种格式,其中包含新 key 以及以前的 key 。所以第一个键是 A,这有助于与服务器通信并检查 A 是否正常。新 key 可能看起来像 AB,意思是“我替换 A,再添加一年的激活,并称为 B,所以一年后,我们将需要像 BC 这样的 key ”。您必须考虑一下如何安全地对其进行编码,但我非常有信心它可以工作(例如,您可以用 A 加密 B,然后 B 只能在具有激活码 A 的计算机上使用)。

关于java - 激活码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4543656/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com