sipa / bech32

Code snippets and analysis of the Bech32 format
192 stars 106 forks source link

How generate bech with wrong ecoding ? #75

Closed mraksoll4 closed 1 year ago

mraksoll4 commented 1 year ago

How generate bech with wrong encoding i need this for tests.

apoelstra commented 1 year ago

In general, to compute invalid data for test vectors, you need to edit the code. It would be quite difficult for us to expose the ability to mangle checksums in various ways, and the value is only for testing. This is true for pretty-much any implementation of any spec.

Bech32 is defined in BIP 173 and there are some precomputed test vectors there.