Please find below code snippet. Is there any chance wherein strncat
and memcpy
will have different values in pDBVal
. If so, Please explain.
memcpy(pDBVal, pHash, 20);
strncat(pDBVal, cBinSalt, 16);
memcpy(pDBVal+20,cBinSalt,16);
Ideally output in pDBVal will be same. Also please explain the difference in execution of both the functions