|
Qt Cryptographic Architecture
|
#include <QtCrypto>

Signals | |
| void | finished () |
Public Member Functions | |
| virtual int | bits () const =0 |
| virtual bool | canExport () const =0 |
| virtual void | convertToPublic ()=0 |
| virtual bool | decrypt (const SecureArray &in, SecureArray *out, EncryptionAlgorithm alg) |
| virtual SymmetricKey | deriveKey (const PKeyBase &theirs) |
| virtual SecureArray | encrypt (const SecureArray &in, EncryptionAlgorithm alg) |
| virtual QByteArray | endSign () |
| virtual bool | endVerify (const QByteArray &sig) |
| virtual bool | isNull () const =0 |
| virtual bool | isPrivate () const =0 |
| virtual int | maximumEncryptSize (EncryptionAlgorithm alg) const |
| PKeyBase (Provider *p, const QString &type) | |
| virtual void | startSign (SignatureAlgorithm alg, SignatureFormat format) |
| virtual void | startVerify (SignatureAlgorithm alg, SignatureFormat format) |
| virtual PKey::Type | type () const =0 |
| virtual void | update (const MemoryRegion &in) |
| Public Member Functions inherited from QCA::Provider::Context | |
| virtual Context * | clone () const =0 |
| Provider * | provider () const |
| bool | sameProvider (const Context *c) const |
| QString | type () const |
Additional Inherited Members | |
| Protected Member Functions inherited from QCA::BasicContext | |
| BasicContext (const BasicContext &from) | |
| BasicContext (Provider *parent, const QString &type) | |
| Protected Member Functions inherited from QCA::Provider::Context | |
| Context (const Context &from) | |
| Context (Provider *parent, const QString &type) | |
Public key implementation provider base.
| QCA::PKeyBase::PKeyBase | ( | Provider * | p, |
| const QString & | type ) |
Standard constructor.
| p | the Provider associated with this context |
| type | type of key provided by this context |
References type().
Referenced by deriveKey(), QCA::DHContext::DHContext(), QCA::DSAContext::DSAContext(), and QCA::RSAContext::RSAContext().
|
pure virtual |
Returns true if this object is not valid.
This is the default state, and the object may also become this state if a conversion or generation function fails.
|
pure virtual |
Returns the type of public key.
Referenced by PKeyBase().
|
pure virtual |
Returns true if this is a private key, otherwise false.
|
pure virtual |
Returns true if the components of this key are accessible and whether it can be serialized into an output format.
Private keys from a smart card device will often not be exportable.
|
pure virtual |
If the key is a private key, this function will convert it into a public key (all private key data includes the public data as well, which is why this is possible).
If the key is already a public key, then this function has no effect.
|
pure virtual |
Returns the number of bits in the key.
Referenced by QCA::RSAContext::createPrivate().
|
virtual |
Returns the maximum number of bytes that can be encrypted by this key.
| alg | the algorithm to be used for encryption |
|
virtual |
Encrypt data.
| in | the input data to encrypt |
| alg | the encryption algorithm to use |
|
virtual |
Decrypt data.
| in | the input data to decrypt |
| out | pointer to an array to store the plaintext result |
| alg | the encryption algorithm used to generate the input data |
|
virtual |
Begin a signing operation.
| alg | the signature algorithm to use |
| format | the signature format to use |
|
virtual |
Begin a verify operation.
| alg | the signature algorithm used by the input signature |
| format | the signature format used by the input signature |
|
virtual |
Process the plaintext input data for either signing or verifying, whichever operation is active.
| in | the input data to process |
|
virtual |
Complete a signing operation, and return the signature value.
If there is an error signing, an empty array is returned.
|
virtual |
Complete a verify operation, and return true if successful.
If there is an error verifying, this function returns false.
| sig | the signature to verify with the input data |
|
virtual |
Compute a symmetric key based on this private key and some other public key.
Essentially for Diffie-Hellman only.
| theirs | the other side (public key) to be used for key generation. |
References PKeyBase().
|
signal |
Emitted when an asynchronous operation completes on this key.
Such operations will be documented that they emit this signal.