I need to sign a file using QCA and qca-ossl in Qt.
the input is a private key and a zip file.
in ruby this can be done like this
@sig = @key.sign(OpenSSL::Digest::SHA1.new, plain)
in Linux I can do this by with command:
openssl rsautl -sign -in file -inkey key.pem -out sig
Here the private key I got in qt by
QCA::PrivateKey seckey = QCA::KeyGenerator().createRSA(1024);
now I need to do the signing in qt
can anybody help me on this?
See QCA::PrivateKey::signMessage, QCA::SignatureAlgorithm
and QCA::MemoryRegion
I guess something like: