Add function to find buffer size for Base32
Add function to find allocated size for Base64
Fix allocation func for null character

The original function didn't account for the trailing '\0'.