Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Verhoeff/doc: Difference between revisions

From CHIPPS
Created page with "This module implements the en:Verhoeff algorithm in Lua. == Usage == === <code>verhoeff_gen(str)</code> === Generates a Verhoeff algorithm check digit for <code>str</code> and returns the digit string with check digit appended. === <code>verhoeff_verify(str)</code> === Verifies the check digit at the end of <code>str</code> according to the Verhoeff algorithm, returning true iff successful."
 
No edit summary
Line 1: Line 1:
This module implements the [[en:Verhoeff algorithm]] in Lua.
This module implements the [[wikipedia:Verhoeff algorithm]] in Lua.


== Usage ==
== Usage ==

Revision as of 10:04, 13 August 2026

This module implements the wikipedia:Verhoeff algorithm in Lua.

Usage

verhoeff_gen(str)

Generates a Verhoeff algorithm check digit for str and returns the digit string with check digit appended.

verhoeff_verify(str)

Verifies the check digit at the end of str according to the Verhoeff algorithm, returning true iff successful.