为 Mac 生成机器特定的密钥
在 Windows 上,我们生成一个特定于 PC 的唯一密钥,用于将许可证与 PC 绑定。它是一个使用wxWidgets的C++应用程序,理论上是跨平台兼容的,但在Mac端没有维护。我们使用一些特定于 Win32 的代码来生成密钥...我如何在 Mac 上做类似的事情?
On Windows, we generate a PC-specific unique key used to tie a license to a PC. It's a C++ app using wxWidgets, which is theoretically cross-platform compatible but not been maintained on the Mac side. We use some Win32-specific code for generating a key... how might I do something comparable on the Mac?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
进一步研究whitelionV和blahdiblah的asnwers,我发现这个有用的页面:
<一href="https://developer.apple.com/library/mac/technotes/tn1103/_index.html#//apple_ref/doc/uid/DTS10002943-CH1-TNTAG3" rel="nofollow">访问系统序列号以编程方式
访问内置MAC地址 :
虽然 MAC 表面上看起来可能更可预测,但他们警告说
我担心这可能意味着您并不总是能得到相同的价值?
Looking more into whitelionV and blahdiblah's asnwers, I found this useful page:
Accessing the system serial number programmatically
Accessing the built-in MAC address programmatically
While MAC is on the face of it probably preferable as being more predictable, they warn that:
It concerns me this might mean you don't always get the same value back?
您只需调用
system_profiler
并查找“序列号”很可能有一种编程方式来获取相同的信息,但我不知道。
You could just call
system_profiler
and look for "Serial Number"There might well be a programmatic way to get the same information, but I don't know it offhand.
要唯一标识任何计算机,您可以尝试使用 MAC 地址。这个过程虽然并不微不足道,但非常简单。有很多跨平台的开源库。
事实上,您可以尝试这个 Apple 开发 示例
To uniquely identify any machine you could try to use the MAC address. The process, although not trivial, its quite simple. There are a lot of cross platform open source libraries.
In fact you could try this Apple dev example