简体   繁体   English

使用 android NFC 读取 MIFARE 门禁卡数据

[英]Reading MIFARE access cards data using android NFC

So here is the problem.所以这就是问题所在。 I'm trying to read the data stored on my work access card using android NFC.我正在尝试使用 android NFC 读取存储在我的工作访问卡上的数据。 I have been able to successfully read the data into data type ByteArray , but when I try to convert this value into a string using Sting(byteArray, UTF-8) i get jargons like this 5�〕CG!�昕�>� .我已经能够成功地将数据读入数据类型ByteArray ,但是当我尝试使用Sting(byteArray, UTF-8)将此值转换为字符串时,我会得到这样的术语5�〕CG!�昕�>�

I have tried several encoding charsets but all to no avail.我尝试了几种编码字符集,但都无济于事。 So my guess is the data stored on these access cards are not string value, but if not, what kind of data can be stored there and how specifically can I get to read it successfully.所以我的猜测是这些门禁卡上存储的数据不是字符串值,但如果不是,那里可以存储什么样的数据以及我如何才能成功读取它。 All I need I believe should be stored is just my name or staff ID我认为应该存储的只是我的姓名或员工 ID

Generally because of the security requirements of access cards any data on the card is encrypted with a key that usually includes the card's UID.通常,由于门禁卡的安全要求,卡上的任何数据都使用通常包括卡的 UID 的密钥进行加密。

So you would need the UID which you can get from the card.因此,您需要可以从卡中获取的 UID。

And knowledge of the encryption algorithm and the encryption key, which you are unlikely to be able to obtain.以及您不太可能获得的加密算法和加密密钥的知识。

Thus I don't think you will be able to decipher what is stored on the card.因此,我认为您无法破译卡上存储的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM