[eluser]Abel A.[/eluser]
You can also remove the = sign and add it afterwards. The only problem is that base64 sometimes adds == (2 signs). If your raw data is a fix length (like a hash, md5, sha256, etc.), then you can predict how many = signs your base64 string will have. The extra = sign serves as padding, that's why it's added.
Ex:
a string of 20 character will always have one = sign
a string of 100 character will always have two = signs
a string of 1000 character will always have one = sign
You get the point. Note, I didn't test the above string lengths, you would have to do that. I image it won't be too hard.