Use sha1_base64(). It's bit shorter than sha1_hex.