First, encode the individual parameters, then add them to the command, do the encryption and then encode the binary string again for sending.
First, encode the individual parameters, then add them to the command, do the encryption and then encode the binary string again for sending.