Since we have BouncyCastle, use it for base64/hex encoding and decoding.