Closed hukkin closed 4 years ago
Maybe the proper fix is to not change b58encode_check
though, but instead throw a TypeError
for b58encode("string")
calls. So only allow bytes
for that too. This is what base64
stdlib does. This would be a breaking change however.
This is a very persistent topic. Originally it was operating on str which I think was a mistake, the promoted usage is bytes in bytes out. Supporting str has been requested before and I think by now there's probably a lot of code using that. I agree it would be more proper to simply go only bytes but I still prefer the pragmatic option of adding scrub input to this call too.
For reference #15 #16 #27
b58encode_check only takes
bytes
as input. This is inconsistent with b58encode, which can handle aUnion[str, bytes]
as input.