Open fangyibkk opened 3 years ago
Yea I think so too, and there's another problem: PAN isn't necessarily always 16 digits. According to EFTlab:
2. Prepare PAN – take 12 rightmost digits of the primary account number (excluding the check digit)
And in their example, they were using 19 digits PAN. Similar problems exist in pinBlockFormat3
too.
I think it might be possible that the 16th digit was considered to be the "check digit", however, I cannot find any information regarding the check digit in PAN. Also, ETFLab's example seems to treat 876543210987
as the "12 rightmost digits of the primary account number", which doesn't contain the check digit.
PIN blocks: PIN block encrypt operation finished
****************************************
PAN: 43219876543210987
PIN: 1234
PAD: N/A
Format: Format 3 (ISO-3)
—————————————-
Clear PIN block:3412ACC9B98CDF43
Questions above should be clarified from ISO PDFs but unfortunately I don't have access to them yet.
I agree, but I don't have time. Code base is simple, please make PR.
Thanks for comfirming! @fangyibkk I have a different implementation of PIN block ISO-0, 1, 2, 3, feel free to try it out: https://www.superarts.org/KTPinBlock/
Hello there. I'm trying out this sample.
but it turns out to be not that value
I think
might possibly be
or just shorthand
slice(-12)
Please help me check if I misunderstood something. Thanks and cheers.
References: http://icma.com/wp-content/uploads/2015/07/PinBlockFormats_SE1-15CM.pdf https://en.wikipedia.org/wiki/ISO_9564#PIN_length