is it right?
Not yet. In getCheckSum() you use strlen, which is based on the presence of a string terminating char (0). But your second byte is 0 so strlen will return 1 and the checksum will be wrong. You can hardcode the length directly in the for() loop, but if you want to make getCheckSum() reusable you can add a second argument for the length of the buffer, i.e. declare getCheckSum(byte* buf, int len).
The general rule is that for an array of bytes without a terminating char you need to supply its length. So, when you call Serial.write() you should pass the buffer length, i.e. Serial.write(buf, len).