Skip to content

Instantly share code, notes, and snippets.

View Adeelgill's full-sized avatar
🗼
Working on rocket science

Adeel Gill Adeelgill

🗼
Working on rocket science
View GitHub Profile
@wurin7i
wurin7i / damm_check_digit.php
Last active March 1, 2020 15:44
Damm validation & generation code in PHP.Damm algorithm is a check digit algorithm that detects all single-digit errors and all adjacent transposition errors.
<?php
/**
* The Damm check digit
* For more information cf. http://en.wikipedia.org/wiki/Damm_algorithm
* totally anti-symmetric quasigroup
*
* @author Wuri Nugrahadi <w.nugrahadi@gmail.com>
*/
if (! function_exists('taq'))
{