如何在 Python 中生成 TrueLicence

发布于 2024-09-15 15:55:05 字数 211 浏览 1 评论 0原文

我们有一个许可服务器,它使用 Java TrueLicense 库生成密钥。我想使用相同的算法将该代码移至 Python,以便新密钥与 Java 代码生成的密钥等效。也许可以使用 PyCrypto 来实现此目的。有谁知道这是否可以在不需要太多努力的情况下完成?

We have a licencing server which generates keys using the Java TrueLicense library. I would like to move that code to a Python using the same algorithm so that the new keys will be equivalent with keys generated with the Java code. Perhaps it is possible to use PyCrypto for this. Does anyone know if this can be done without too much effort?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

三生池水覆流年 2024-09-22 15:55:05

虽然已经晚了,但对于遇到类似问题的其他人来说:

我已经花时间阅读了 TrueLicense 源代码并用 Ruby 重新实现了其中的大部分内容。如果您愿意的话,也许可以帮助您在 Python 中重新实现它:

https://github.com/einarmagnus/truby_license

This is late, but for anyone else coming here with similar problems:

I have taken the time to read through the TrueLicense source and reimplement most of it in Ruby. Maybe that can help you reimplement it in Python if you wish:

https://github.com/einarmagnus/truby_license

猫卆 2024-09-22 15:55:05

一些想法:

  • 在 Python 中自行实现 TrueLicense
  • 编写一个与 Python 程序交互的 Java 应用程序
  • Jython并直接使用lib

Some ideas:

  • make an own implentation of TrueLicense in Python
  • write a Java application that interacts with your Python program
  • write your Python app or parts of it in Jython and use the lib directly
只为一人 2024-09-22 15:55:05

也许你可以使用 jpype

JPype 是让 python 能够
程序完全访问java类
图书馆。这是实现不了的
通过重新实现Python,如
Jython/JPython 已经做到了,但更确切地说
通过本地接口
两个虚拟机中的级别。

Maybe you can use jpype

JPype is an effort to allow python
programs full access to java class
libraries. This is achieved not
through re-implementing Python, as
Jython/JPython has done, but rather
through interfacing at the native
level in both Virtual Machines.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文