How I make use of beyond compare when coding?

Recently I trying to read a token file(basically a file which considers some encrypted text/plain text containing a password) into a buffer and then read that for verification purposes.
Example file as below:
<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no” ?>
<RSAKeyValue><Modulus>HOYfY2s4gKaT2DbXNgcps3vVfloYz5DzrEK</:Modulus>
</RSAKeyValue>
</enabled>NULL
The above is just a example of the content inside the file. Now I didnt want to read it from a file everytime so I was storing in a string and then reading.
The string was a below:
std::string temp = “<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no” ?>
<RSAKeyValue><Modulus>HOYfY2s4gKaT2DbXNgcps3vVfloYz5DzrEK</:Modulus>
</RSAKeyValue>
</enabled>NULL”;
But this wasnt going through the string comparison or enryption processes. When I checked it through beyond compare I came to know the difference. I used the hex viewer available for this. At the end of the string I had to include rn to match the strings as below:
std::string temp = “<?xml version=”1.0″ encoding=”UTF-8″ standalone=”no” ?>rn
<RSAKeyValue><Modulus>HOYfY2s4gKaT2DbXNgcps3vVfloYz5DzrEK</:Modulus>rn
</RSAKeyValue>rn
</enabled>”;
After this I was able to get the correct comparisons.

Leave a Reply

Your email address will not be published. Required fields are marked *