C# 中的智能卡 API,对 Linux 友好

发布于 2024-11-24 22:37:34 字数 182 浏览 8 评论 0原文

我目前有一个在 Windows 中运行的项目,使用 P/Invokes 调用智能卡 API;然而,由于我现在已经开源该项目并将其放在 Google Code 上,因此我有兴趣让它在 Mono 上适用于 Linux。

然而,这样做的障碍是智能卡代码;我对 Linux 下与智能卡交互的熟悉程度为零,谷歌搜索也没有透露任何有启发性的内容。

I currently have a project that operates in Windows using P/Invokes to call the Smartcard API; however, since I've now open-sourced the project and put it on Google Code, I'd be interested in making it work for Linux peeps on Mono.

The blockade to doing that however, is the smartcard code; I have absolutely zero familiarity with talking to smartcards under Linux and Google searches haven't revealed anything enlightening.

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

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

发布评论

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

评论(2

ゝ偶尔ゞ 2024-12-01 22:37:35

我认为 PCSC 就是您正在寻找的。没有使用过它,因为我不必处理 Mono/Linux,尽管我无法向您提供任何有关它的详细信息。

I think PCSC is what youre are looking for. Haven't used it because I don't have to deal with Mono/Linux, though I can't give you any details about it.

阳光①夏 2024-12-01 22:37:34

好吧,我找到了答案; PCSC-lite 以兼容的格式实现了整个 WinSCard API,因此我所需要做的就是将一个小的 .exe.config 与程序捆绑在一起,以便 mono 将替换 DllImport WinSCard.dll 与 pcsclite.so.1 在运行时运行,一切都开箱即用。

Well, I found my answer; PCSC-lite implements the entire WinSCard API in a compatible format, so all I've needed to do is bundle a small .exe.config with the program so that mono will replace the DllImport for WinSCard.dll with pcsclite.so.1 at runtime and everything works out of the box.

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