Verhoeff Checksum#

This module includes functions for Verhoeff checksum calculation and validation.

The functions in this module are available when OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE is enabled.

Functions#

otVerhoeffChecksumCalculate(const char *aDecimalString, char *aChecksum)

Calculates the Verhoeff checksum for a given decimal string.

otVerhoeffChecksumValidate(const char *aDecimalString)

Validates the Verhoeff checksum for a given decimal string.

Macros#

#define

Specifies the maximum length of decimal string input in otVerhoeffChecksum functions.

Function Documentation#

otVerhoeffChecksumCalculate#

otError otVerhoeffChecksumCalculate (const char * aDecimalString, char * aChecksum)

Calculates the Verhoeff checksum for a given decimal string.

Parameters
[in]aDecimalString

The string containing decimal digits.

[out]aChecksum

Pointer to a char to return the calculated checksum.

Requires OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE.


Definition at line 75 of file include/openthread/verhoeff_checksum.h

otVerhoeffChecksumValidate#

otError otVerhoeffChecksumValidate (const char * aDecimalString)

Validates the Verhoeff checksum for a given decimal string.

Parameters
[in]aDecimalString

The string containing decimal digits (last char is treated as checksum).

Requires OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE.


Definition at line 90 of file include/openthread/verhoeff_checksum.h

Macro Definition Documentation#

OT_VERHOEFF_CHECKSUM_MAX_STRING_LENGTH#

#define OT_VERHOEFF_CHECKSUM_MAX_STRING_LENGTH
Value:
128

Specifies the maximum length of decimal string input in otVerhoeffChecksum functions.


Definition at line 60 of file include/openthread/verhoeff_checksum.h