Function otVerhoeffChecksumCalculate

Source
pub unsafe extern "C" fn otVerhoeffChecksumCalculate(
    aDecimalString: *const c_char,
    aChecksum: *mut c_char,
) -> otError
Expand description

Calculates the Verhoeff checksum for a given decimal string.

Requires OPENTHREAD_CONFIG_VERHOEFF_CHECKSUM_ENABLE.

@param[in] aDecimalString The string containing decimal digits. @param[out] aChecksum Pointer to a char to return the calculated checksum.

@retval OT_ERROR_NONE Successfully calculated the checksum, @p aChecksum is updated. @retval OT_ERROR_INVALID_ARGS The @p aDecimalString is not valid, i.e. it either contains chars other than [‘0’-‘9’], or is longer than OT_VERHOEFF_CHECKSUM_MAX_STRING_LENGTH.