I am currently building a basic auth syste, and i have an user activation feature what generates a 20 character long string and encodes it to `sha1` , but i saw a few other systems use `base64_encode` could please someone explain what is better and why?

Thank you