Awesome!  That is indeed a pretty cool way of performing account number
validation, and something I'll definitely be playing with :)

Roland

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Peter J. Farrell
Sent: Friday, March 04, 2005 4:03 PM
To: [email protected]
Subject: Re: [CFCDev] Verhoeff Check Digit CFC Released

Roland Collins wrote:

>Looks wonderful . . . now what is it good for?  Examples?  Use cases?
>Honestly - I have no idea what this does at this point!
>
>Roland
>  
>
Sorry, I haven't replied sooner.  Had to deal with the entire Vonage 
network going down as I used it get all my US client calls to me here in 
Canada.

Well, I should have explain check digits a little better in my post.  A 
check digit is a type of redunancy check and is used for error 
detection.  It is like a binary checksum for decimal equivalents.  A 
check digit is mathematically computed based on a numerical string and 
usually appended to the end of the original string.  Any change to the 
numerical string (including the check digit) would result in a different 
check digit.

Some other famous schemes that use check digits are:
- UPC (weight factor of 3 using MOD 10)
- ISBN (aka MOD 11)
- MOD 10 (weight factor of 3 - used with Credit Cards)(aka Luhn 
algorithm and IBM check)
- EFT (electronic funcs transfer - uses weighted positions with 3, 7 and 
1 - it's MOD 10 varient)
- VIN (vehical identification number)
- Most State DLs

Example with Verhoeff check digit scheme:
Original Str = 123
Check = 3
Completed Str = 1233

But if I made a mistake (a transposition error) and entered:
Original Str = 132
The computed check would be: 0
Complete Str = 1320

For instance, one project of mine uses the Verhoeff check digit on the 
end of company account numbers.  This helps our tech support enter 
account numbers correctly and pulling up the proper information the 
first time.  If you were to use auto incremented number from a DB for an 
identification number, check out the problem below:

#10000
#10001
#10002
#10003
#10004
#10005

It might be easy to key one of those numbers incorrectly.  With the 
check digit included:

#10000 = #100005
#10001 = #100014
#10002 = #100022
#10003 = #100033
#10004 = #100046
#10005 = #100051

I should note that the Verhoeff scheme is, in my opinion (and many 
mathematicians - which I am not one), the strongest check digit scheme 
currently available.  It catches most entry errors - avoiding almost all 
the weaknesses of MOD 10 and it's varients.  A check digit is useful for 
any sort of account, invoice and identification  numbers of any sort.  
It provides another layer of redunancy check especially when dealing 
with number that are prone to human entry errors.

.Peter
 "Follow the gourd!  No, Follow the sandal!"

--

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to