本文介绍了解码南非(ZA)驾驶执照的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在编写一种扫描PDF417条码的解决方案( http://en.wikipedia.org/wiki/PDF417 )位于iOS的南非驾驶执照背面.我找不到任何有关解码条形码的文档或规范.是否有人链接到可以解码存储在PDF417条码中的驾驶执照数据的规范或示例代码?谢谢

I am writing a solution to scan PDF417 barcode (http://en.wikipedia.org/wiki/PDF417) at the back of a South African drivers license for iOS. I can't find any documentation or specification how to decode barcode. Does anyone have a link to a specification or sample code that can decode driver license data stored in PDF417 barcode? Thanks

推荐答案

扫描PDF417条码后的数据为720字节.前4个字节指示条形码的版本.版本2涵盖了所有当前有效的许可证.

The data after scanning the PDF417 barcode is 720 bytes. First 4 bytes indicate the version of barcode.Version 2 covers all currently valid licenses.

版本1:01 e1 02 45

版本2:01 9b 09 45

接下来的两个字节为零(00 00).

Next two bytes are zero (00 00).

剩余714字节构成6个块-5个块的128个块,1个块的74个块.

Remaining 714 bytes form 6 blocks - 5 blocks of 128, 1 block of 74.

根据版本和块大小使用不同的键.

Different keys are used depending on version and and block size.

版本1,128个字节

-----BEGIN RSA PUBLIC KEY-----
MIGXAoGBAP7S4cJ+M2MxbncxenpSxUmBOVGGvkl0dgxyUY1j4FRKSNCIszLFsMNw
x2XWXZg8H53gpCsxDMwHrncL0rYdak3M6sdXaJvcv2CEePrzEvYIfMSWw3Ys9cRl
HK7No0mfrn7bfrQOPhjrMEFw6R7VsVaqzm9DLW7KbMNYUd6MZ49nAhEAu3l//ex/
nkLJ1vebE3BZ2w==
-----END RSA PUBLIC KEY-----

版本1,74个字节:

-----BEGIN RSA PUBLIC KEY-----
MGACSwD/POxrX0Djw2YUUbn8+u866wbcIynA5vTczJJ5cmcWzhW74F7tLFcRvPj1
tsj3J221xDv6owQNwBqxS5xNFvccDOXqlT8MdUxrFwIRANsFuoItmswz+rfY9Cf5
zmU=
-----END RSA PUBLIC KEY-----

版本2,128个字节:

Version 2, 128 bytes:

-----BEGIN RSA PUBLIC KEY-----
MIGWAoGBAMqfGO9sPz+kxaRh/qVKsZQGul7NdG1gonSS3KPXTjtcHTFfexA4MkGA
mwKeu9XeTRFgMMxX99WmyaFvNzuxSlCFI/foCkx0TZCFZjpKFHLXryxWrkG1Bl9+
+gKTvTJ4rWk1RvnxYhm3n/Rxo2NoJM/822Oo7YBZ5rmk8NuJU4HLAhAYcJLaZFTO
sYU+aRX4RmoF
-----END RSA PUBLIC KEY-----

版本2,74个字节:

-----BEGIN RSA PUBLIC KEY-----
MF8CSwC0BKDfEdHKz/GhoEjU1XP5U6YsWD10klknVhpteh4rFAQlJq9wtVBUc5Dq
bsdI0w/bga20kODDahmGtASy9fae9dobZj5ZUJEw5wIQMJz+2XGf4qXiDJu0R2U4
Kw==
-----END RSA PUBLIC KEY-----

分别解密每个块.使用RSA ENCRYPT函数解密公钥.

Decrypt each block separately. Decrypted with RSA ENCRYPT function usingthe public key.

这篇关于解码南非(ZA)驾驶执照的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 21:26