/*! \brief Decrypts a buffer file using a XOR operation. \param[in] pCrypted_in : a buffer containing the encrypted data \param[out] pDecrypted_out : a buffer receiving the decrypted data \param[in] Length_in : the length of the buffers \return true if the parameters were correct; false otherwise */ bool Decrypt(const char *pCrypted_in, char **pDecrypted_out, int Length_in) { if (Length_in > 0 && pCrypted_in != NULL && pDecrypted_out != NULL && *pDecrypted_out != NULL) { for (int i = 0; i < Length_in; ++i) { // XOR 01110011 *(*pDecrypted_out + i) = (*(pCrypted_in + i) ^ 0x73); } return true; } return false; }