-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BIP-173 states that a bech32 string must not exceed 90 characters but this is a bip specification, the bech32/bech32m checksum algos can actually cover more characters than that. To keep the `segwit` stuff bip compliant and also keep the library general add an associated `CODE_LENGTH` const to the `Checksum` trait. Then in the `segwit` module and types enforce the 90 character limit but in the general API and modules enforce the `Ck::CODE_LENGTH` limit. FTR in `bech32 v0.9.0` no lengths were not enforced.
- Loading branch information
Showing
6 changed files
with
363 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.