I need encrypt and decrypt file (in QT SDK). Encrypt by private key. Decript by public key.
I can't find any usable example on net. Can you push me on the right way?
I need encrypt and decrypt file (in QT SDK). Encrypt by private key. Decript by public key.
I can't find any usable example on net. Can you push me on the right way?
I investigate how to work with certificates in QT. Problem is, that it depend by OpenSSL version, windows / linux version and 32/64 bit.
For me I use Windows minGW/32, MSVC2015/32/64 builds.
The First: I use step by step tutorial on youtube "RSA and AES Primer with OpenSSL" (item 150-153) Thank you very much Bryan. https://www.youtube.com/watch?v=LATSg00HaXk
The second: Bryen works on linux. On windows its problem with library names.
You must download or compile OpenSSL libraries. I use download from https://slproweb.com/products/Win32OpenSSL.html Only OpenSSL-Win32.v1.0.2n worked me in combination with tutorial. I did not try my own build. Thank you very much Thomas.
You must add headers and liberaries into your pro file, like this:
LIBS += -LD:/Develop/openssl/OpenSSL-Win32.1.0.2.n.full -llibeay32 LIBS += -LD:/Develop/openssl/OpenSSL-Win32.1.0.2.n.full -llibssl32 LIBS += -LD:/Develop/openssl/OpenSSL-Win32.1.0.2.n.full -lssleay32 INCLUDEPATH += D:/Develop/openssl/OpenSSL-Win32.1.0.2.n.full/include
4. If you want work with 64bit version, you must do own build for MSVC2015/17 and use it. I don't test this step at this moment.