python 中有独立的 pgp 实现吗?

发布于 2025-01-07 02:12:46 字数 180 浏览 2 评论 0原文

我所说的“独立”是指一个模块,它允许我的应用程序管理自己的密钥数据库,而不是将资源分配给与其运行的操作系统的用户帐户关联的数据库?

我红色 python-gnupg 的文档,如果我理解正确的话,它依赖于用户本地密钥数据库。

我很高兴能找到一个可以在 Linux 上运行的解决方案。目前对其他平台的支持的优先级较低。

By 'standalone' I mean a module that allows my application to manage its own database of keys rather than resourcing to the one associated to the user account of the operative system where it runs?

I red python-gnupg's docs, if I understood it correctly it relies on the user local keys database.

I'd be happy with a solution that would work on linux. Support for other platforms has low priority at the moment.

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

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

发布评论

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

评论(2

不乱于心 2025-01-14 02:12:46

当您使用 python-gnupg 时,您可以使用它的 GPG()带有 keyring 参数的 构造函数:

keyring(默认为 None)如果指定,则该值用作名称
密钥环文件的。不使用默认密钥环。

When you use python-gnupg you can use its GPG() constructor with keyring argument:

keyring (defaults to None) If specified, the value is used as the name
of the keyring file. The default keyring is not used.

婴鹅 2025-01-14 02:12:46

使用 python-gnupg 两个参数都是可能的,keyringgnupghome

主目录方法的好处是,不仅使用另一个(公共)密钥环,而且您将使用该专用目录中的所有文件。如果它不存在,它将在创建 gnupg.GPG 实例时创建并填充 - 很好而且理智。

Using python-gnupg both arguments are possible, keyring and gnupghome.

The bonus for the home dir approach is, that not only another (public) keyring is used, but you'll use all files in that dedicated directory. If it doesn't exist, it will be created and populated on creation of the gnupg.GPG instance - nice and sane.

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