Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don’t use base58. Even bitcoin, which originated or at least popularized base58 has moved away from it. They are a pain to encode and decode, with a naive implementation requiring a bignum library, and they don’t save you much in the end over a base32.


But you don't need to encode or decode anything here? Tokens are just random strings?


How do you think the token is generated if not through an encoding process?

Other disadvantage I forgot to mention earlier: base58 is variable length, which is a foot gun that will bite you eventually.


Using base58 here strikes me as simply unnecessary. You could just use the base58 alphabet and directly generate random strings in that alphabet, easily and cheaply. The only thing you loose is the ability to decode into a bit shorter binary string for storage - almost certainly not worth it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: