globalcitizen/php-iso7064

php-iban is a library implementing the pure ISO/IEC 7064 checksum functions.

v1.0.1 2020-08-07 19:36 UTC

This package is auto-updated.

Last update: 2024-04-08 03:26:24 UTC


README

This is a reference implementation of the various 'pure' ISO7064 algorithms in PHP. It is 100% generated code, from algorithm metadata. Note that the 'hybrid' algorithms are not implemented.

Build Status Latest Stable Version License

Algorithms implemented

Algorithm Function name Input Output
ISO/IEC 7064, MOD 11-2 iso7064_mod11_2() Numeric 1 x Alphanumeric
ISO/IEC 7064, MOD 37-2 iso7064_mod37_2() Alphanumeric 1 x Alphanumeric
ISO/IEC 7064, MOD 97-10 iso7064_mod97_10() Numeric 2 x Numeric
ISO/IEC 7064, MOD 661-26 iso7064_mod661_26() Alphabetic 2 x Alphabetic
ISO/IEC 7064, MOD 1271-36 iso7064_mod1271_36() Alphanumeric 2 x Alphanumeric

History

August 2020

February 2016

Inspiration was @danieltwager's ISO7064 Java Library and the pressing need to auto-detect checksum algorithms for php-iban. Annoyingly, there didn't seem to be any way to define normal functions dynamically in PHP, so I had to settle for code generation instead of a reflective implementation.