Skip to main content

decode_string

Function decode_string 

Source
pub fn decode_string(s: &str) -> Result<DecodedString, Error>
Expand description

Decode an mk1 string, validating HRP, case, length, and checksum.

Performs full BCH error correction up to four substitutions (t = 4 capacity of the BCH(93, 80, 8) regular code and the BCH(108, 93, 8) long code), via syndrome-based Berlekamp–Massey + Forney decoding (implemented in the sibling bch_decode module).

Errors: