encode base64 for password byte array