
Originally Posted by
unix7777
OpenSSL is used for network transfer encryption.What i need is completely different.i need to encrypt a plain text using AES256 algorithm
libcrypto is a cryptographic library. Period.
BTW. Pencils don't really write on pants and they are quite lousy when writing on walls too. libcrypto is much better in doing AES encryption 
A snippet of code from my libcrypto wrapper:
QByteArray result
= device.
readAll();
// some encrypted data QwwCipher ciph("aes-128-cbc");
ciph.setKey("0123456789ABCDEF");
ciph.setInput(&result);
ciph.setOutput(&f);
ciph.decryptAll();
QByteArray result = device.readAll(); // some encrypted data
QwwCipher ciph("aes-128-cbc");
ciph.setKey("0123456789ABCDEF");
ciph.setIv(QByteArray(16,0));
ciph.setInput(&result);
QFile f("/tmp/tst.txt");
ciph.setOutput(&f);
ciph.decryptAll();
To copy to clipboard, switch view to plain text mode
BTW 2. libcrypto is doing all the PKI for SSL/TLS so it's definitely not only about transfering data over network (which it doesn't do) - something has to generate, sign and verify SSL keys and certificates, right?
Bookmarks