I'm currently working on a project where I have to decrypt/crypt some string values. I'm working with C# in visual studio 2019, and the objective is to decrypt data to interact with them in an application WPF, and then re-crypt the data after use.
The crypt/decrypt algorithm used is the SimpleCrypt from Qt C++, and I have to transcript that one into C#.
For the context, the data are first crypted once, then I take them from an XML file, decrypt them for use, then crypt them back for the final place to use the data.
I already found how to decrypt the data (transcripted in C#), but when I have to crypt it back, I need to use something similar to the qChecksum. Problem, I don't understand how this function work.
QByteArray ba = plaintext; //plaintext = "2"
QByteArray integrityProtection;
QDataStream s(&integrityProtection, QIODevice::WriteOnly);
s << qChecksum(ba.constData(), ba.length());
My data is equal to a string "2" and I suppose to find an integrity protection equal to "âé".
After much research, I didn't find what was the exact algorithm used for this function...
Maybe someone has the answer ?