Files
RedBear-OS/local/recipes/libs/qca/source/examples/examples.doco
T
vasilito 7284eec11e
redbear-ci / check (push) Waiting to run
libs: vendor qca (Qt Cryptographic Architecture, Qt6) for kf6-kwallet ksecretd
kf6-kwallet's ksecretd daemon (the org.freedesktop.secrets Secret Service
provider) requires Qca-qt6 2.3.1. Vendor QCA 2.3.10 under the full-fork model
and build the gcrypt provider plugin (backed by the vendored libgcrypt) so QCA
has a working SymmetricCipher/Hash/PBKDF2 backend on Redox. External-toolkit
providers (ossl/nss/botan/gnupg/pkcs11/cyrus-sasl) are disabled — those
libraries are not part of the Redox userland; logger + softstore (pure-Qt) are
kept.

Source edit: the top-level Qt6 find_package required the Test component
unconditionally; gate it on BUILD_TESTS so a tools/tests-off build configures
without Qt6Test. Install via DESTDIR since QCA anchors its install dirs to the
absolute Qt prefix (/usr), which ignores cmake --install --prefix.

Build libgpg-error + libgcrypt with --with-pic so their static archives can be
linked into the qca-gcrypt shared plugin. Add qca to kf6-kwallet deps.
2026-08-02 04:44:37 +03:00

183 lines
3.6 KiB
Plaintext

/** \example aes-cmac.cpp
This example shows how to implement a client side "provider".
There are three important parts to this:
- the class derived from QCA::Provider (in this example called
"ClientSideProvider"), that generates the context class
- one or more context classes (in this example only one, implementing
AES-CMAC, called "AESCMACContext")
- a call to QCA::insertProvider, to add the QCA::Provider subclass
into QCA
*/
/** \example base64test.cpp
The code below shows some simple operations on a QCA::Base64 object, converting
between QCA::SecureArray and QString.
*/
/** \example certtest.cpp
This example shows how QCA::Certificate and QCA::CertificateCollection
can be used. Note that the argument, if you provide it, must be a
PEM encoded file collection.
*/
/** \example ciphertest.cpp
The code below shows the normal way to use the QCA::Cipher class.
*/
/* \example cmssigner/main.cpp
The code below shows how to use Cryptographic Message Syntax (CMS)
in a GUI application.
\include certitem.h
\include certitem.cpp
\include certviewdlg.h
\include certviewdlg.cpp
\include keyselectdlg.h
\include keyselectdlg.cpp
\include prompter.h
\include prompter.cpp
*/
/** \example eventhandlerdemo.cpp
The code below shows to implement a client side handler for
password / passphrase / PIN and token requests from QCA and any
associated providers.
*/
/** \example hashtest.cpp
The code below shows how to use the QCA::Hash class
*/
/** \example hextest.cpp
The code below shows some simple operations on a QCA::Hex object, converting
between QCA::SecureArray and QString.
*/
/** \example keyloader.cpp
The code below shows how to load a private key from a PEM format file,
including handling any requirement for a passphrase. This is done using
the QCA::KeyLoader class.
*/
/** \example mactest.cpp
The code below shows how to use the QCA::MessageAuthenticationCode class
*/
/** \example md5crypt.cpp
The code below shows how to calculate an md5crypt based password. This
code is compatible with the glibc code.
*/
/** \example providertest.cpp
The code below shows some simple operations on a QCA::Provider object, including
use of iterators and some member functions.
*/
/** \example publickeyexample.cpp
The code below shows how to do public key encryption, decryption,
signing and verification.
*/
/** \example randomtest.cpp
The code below shows the normal way to use the QCA::Random class.
*/
/** \example rsatest.cpp
The code below shows some of the capabilities for how to use
RSA. This example also shows how to export and import a key
to a file, using PEM encoding.
*/
/** \example saslserver.cpp
The code below shows how to create a SASL server.
*/
/** \example saslclient.cpp
The code below shows how to create a SASL client.
*/
/** \example sslservtest.cpp
The code below shows how to create an SSL server.
Note that this server returns a self-signed certificate
for "example.com", and that the certificate is expired.
The design used here only allows for one connection
at a time. If you want to allow for more, you should
probably create a "TlsConnection" object that agregates
a QCA::TLS object and a QTcpSocket (plus a little bit of
state information) that handles a single connection. Then
just create a TlsConnection for each server connection.
*/
/** \example ssltest.cpp
The code below shows how to create an SSL client
*/
/** \example tlssocket.cpp
The code below shows how to create a socket that can operate
over an Transport Layer Security (TLS, also known as SSL) connection.
\include tlssocket/tlssocket.h
\include tlssocket/main.cpp
*/