I have a method which generates a random salt then I use sha1() on it. How safe would it be to use base64_encode() after I sha1() it? And when I say “safe” I mean, does it have any known collisions or problems with it? I want to use base64_encode() as a means to make it visually different from a sha1() hash but don’t know if it makes a hash (in any way) weaker if I do that. Also, is there a better way do what I’m trying to accomplish while staying within PHP4 (yes, that’s PHP 4).
A few things: I’m not interested in encryption or that base64_encode() can be decoded. I know it can be decoded.
Just use SHA-256 and call it a day.
SHA256 Secure Hash Algorithm for PHP 4+
http://www.nanolink.ca/pub/sha256/
No need for double encoding or encrypting.