You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we did when writing in the `segwit` module; add a buffer to cache
characters and do writes a buffer at a time.
Although we do know the maximum length of the string we are encoding,
and we enforce this limit using `encoded_length::<Ck>()` we use an
unrelated fixed buffer size and loop over it as many times as needed.
This is because, surprisingly the following is not valid Rust
`let mut buf = [0_u8, Ck::CODE_LENGTH];`
We use a buffer of length 1024 which is larger than the 1023 code length
of the two `Checksum` implementations we provide with this
crate (`Bech32` and `Bech32m`).
0 commit comments