[][src]Function luhn::checksum

pub fn checksum(input: &[u8]) -> u8

Computes the Luhn check digit for the given string.

The string formed by appending the check digit to the original string is guaranteed to be valid. Input must be uppercase alphanumeric ASCII; panics otherwise.