Skip to main content

bch_verify_regular

Function bch_verify_regular 

Source
pub fn bch_verify_regular(hrp: &str, data_with_checksum: &[u8]) -> bool
Expand description

Verify a regular-code BCH checksum.

data_with_checksum is the full data part including the trailing 13 checksum characters. Returns true iff the polymod over hrp_expand(hrp) || data_with_checksum equals MK_REGULAR_CONST.