Remix.run Logo
▲ Athas 18 hours ago

This is the C explanation perspective, but a similar thing could happen in Python, if you write `s[0]` instead of `s`, perhaps due to a refactoring that changes an array of keys to a single key. This is because Python does not distinguish characters from strings. (Not an indictment of Python; just another proposal for how this could happen, and I would say it is more likely to use Python than C in some hacked-up signing script.)

▲account42 16 hours ago | parent | next [-]

That should still produce uniformly random 8-bit numbers but these keys don't even look all that random in that range.

▲lionkor 15 hours ago | parent | prev [-]

Well, my example is C++, it relies on function overloading existing for, for example, to_string(uint8_t[]) and to_string(uint8_t) separately, which means this error would come down to overloading instead of catching the type error.

Just saying, because C++ is very popular everywhere in this "kind" of company, if you catch my drift.