是否有JavaScript(或其他)库来读取驱动程序的许可证? [英] Is there a JavaScript (or other) library to read driver's licenses?

查看:127
本文介绍了是否有JavaScript(或其他)库来读取驱动程序的许可证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个JavaScript项目,涉及在键盘仿真模式下从USB磁条阅读器读取信用卡和驾驶执照。事实证明,获得信用卡非常容易,因为它们都是相同的格式。然而很快就会发现驱动程序的许可证更加困难,因为即使在单个州(CA)内,格式也会因卡片而异。

I'm working on a JavaScript project that involves reading credit cards and driver's licenses from a USB magnetic stripe reader in keyboard emulation mode. It turns out getting credit cards working was extremely easy, as they're all in the same format. However it quickly became clear that driver's licenses are much harder, as even within a single state (CA) the format varies from one card to the next.

无论如何,目标是从原始数据中取出驾驶执照(使用磁条读取器)并从中提取数字,以便为尽可能多的美国州产生正确的数字(所有这50个都是惊人的)。值得一提的是我并不特别关注验证,至少目前还没有。

In any case, the goal is to take the raw data from swiping a driver's license (using a magnetic stripe reader) and extract the number from it, in a way that produces the correct number for as many U.S. states as possible (all 50 would be amazing). Worth mentioning is that I am not particularly concerned with validation, at least not at this point.

还有其他人已经做过这个,并打包过这一切都在我可以使用的图书馆(免费或商业)?那将是非常棒的。

Has anyone else already done this, and packaged it all up in a library (either free or commercial) I could use? That would be awesome.

我还应该注意,虽然我很乐意看到JavaScript解决方案,但实际上我愿意调查任何解决方案语言。

I should also note that while I'd love to see a JavaScript solution, in reality I'm open to investigating any solution, written in any language.

推荐答案

首先,大多数州都没有在驾驶执照上使用磁条,或者至少就是这种情况2009年: http://www.digitaldoorkeep.com/blog/tag / drivers-license-magnetic-stripe /

First of all most states don't use magnetic stripe on drivers' licences, or at least that was the case in 2009: http://www.digitaldoorkeep.com/blog/tag/drivers-license-magnetic-stripe/

查找剩余状态的数据格式是与谷歌相处的一段时间(我在3中找到了这个问题)分钟: http://www.dgahouston.com/msrdata2.htm )或实际申请信息:这是公共信息。

Finding data format for the remaining states is a matter of spending some time with google (I found this in 3 minutes: http://www.dgahouston.com/msrdata2.htm ) or actually requesting the information: it's public information.

另请阅读: http ://www.dgahouston.com/dlsplit1.htm - 扫描在某些州,许可证是非法的。

Also read this: http://www.dgahouston.com/dlsplit1.htm - scanning licences is illegal in some states.

这篇关于是否有JavaScript(或其他)库来读取驱动程序的许可证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆