[Moved] How to display in an editor the result of encryption
I’m using qca to encrypt data by doing as follows: SecureArray pubkey.encrypt result = (arg, QCA:: EME_PKCS1_OAEP);
What I want is to display result in an editor to use the result of encryption in an application by making a copy paste into a text box
How could it?
I’m using this
- QString rstr = QCA::arrayToHex(result.toByteArray());
But when I want I use this string in my application, when I use my secret key to decrypte this string, the decryption failed.
I do this to construct the securrArray whitch I passe to my methode for decryption:
- QCA::SecureArray messageCrypte(clefSaisie.toStdString().c_str())
Round-trip (as I would expect it):