Make sure to encode data into binary form before calling sha1_base64