Home > Mobile >  Qt with openssl public-key encryption
Qt with openssl public-key encryption

Time:11-26

As the title, but I need to do is to use a public key to encrypt data string form others, most of the online reference is to generate the public key encryption to others again, want to ask about you how to do things, here attach the reference page, but according to this method have no way to show that
https://blog.csdn.net/yajunsun/article/details/78909920

CodePudding user response:

This as qt didn't matter much, you don't have to be only on the Internet looking for using qt

CodePudding user response:

Has been solved, can give you a reference, the website sent public key was actually a bit problem, inserted between the characters, only when I am on https://www.bejson.com/enc/rsa/test found that that is to say, if you give the public key is others, you first make sure there is something wrong with the public key, and then directly to the public key before and after the string plus -- bengin... , follow the pem format, also, the on site test is feasible, a QString codeone=publickey;
Codeone. Remove (" power ");//remove power

QString begincode="-- -- -- -- -- BEGIN PUBLIC KEY -- -- -- -- -- \ n";
QString endcode="\ n -- -- -- -- -- END PUBLIC KEY -- -";
QString rsaCode=begincode + codeone + endcode;
Is this a piece, a major part of my code
  •  Tags:  
  • Qt
  • Related