(12C) Luhn algorithm
|
04-18-2018, 06:29 PM
(This post was last modified: 04-18-2018 07:19 PM by pinkman.)
Post: #1
|
|||
|
|||
(12C) Luhn algorithm
Ho,
referring to the wikipedia page of the Luhn algorithm, I propose an implementation for the 12c. How to use it ? As the 12c has only 10 significant digits, we'll have to split the credit card number into 2 parts. (Ex: 1234 5678 9012 3456 will be split in 12345678 and 90123456) After having entered the code, clear the registries 0 and 1 and then enter the right part of the number. (Ex: 90123456) Then hit R/S until it displays 0 (don't forget to hit R/S if there were leading zeros). You can then enter the left part of the number. (Ex: 12345678) Then hit R/S until it displays 0 (don't forget to hit R/S if there were leading zeros). The Luhn key is in REG 0 => RCL 0 If it is a multiple of 10, your Luhn key is OK. The number of processed digits is in REG 1. To test : 543210 => 15 in REG 0 (Luhn KO) 543215 => 20 in REG 0 (Luhn OK) Looking forward to reading you. Thibault Code:
|
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(12C) Luhn algorithm - pinkman - 04-18-2018 06:29 PM
RE: (12C) Luhn algorithm - Dieter - 04-23-2018, 08:19 AM
RE: (12C) Luhn algorithm - pinkman - 04-24-2018, 08:00 AM
RE: (12C) Luhn algorithm - Dieter - 04-24-2018, 06:35 PM
RE: (12C) Luhn algorithm - Dieter - 04-24-2018, 07:40 PM
RE: (12C) Luhn algorithm - pinkman - 04-24-2018, 08:27 PM
RE: (12C) Luhn algorithm - Dieter - 04-25-2018, 07:22 AM
RE: (12C) Luhn algorithm - pinkman - 04-25-2018, 02:52 PM
|
User(s) browsing this thread: 1 Guest(s)