Qt Cryptographic Architecture
|
#include <QtCrypto>
Public Member Functions | |
BigInteger | e () const |
BigInteger | n () const |
RSAPublicKey () | |
RSAPublicKey (const BigInteger &n, const BigInteger &e, const QString &provider=QString()) | |
RSAPublicKey (const RSAPrivateKey &k) | |
![]() | |
bool | canDecrypt () const |
bool | canEncrypt () const |
bool | canVerify () const |
bool | decrypt (const SecureArray &in, SecureArray *out, EncryptionAlgorithm alg) |
SecureArray | encrypt (const SecureArray &a, EncryptionAlgorithm alg) |
int | maximumEncryptSize (EncryptionAlgorithm alg) const |
PublicKey & | operator= (const PublicKey &from) |
PublicKey () | |
PublicKey (const PrivateKey &k) | |
PublicKey (const QString &fileName) | |
PublicKey (const PublicKey &from) | |
void | startVerify (SignatureAlgorithm alg, SignatureFormat format=DefaultFormat) |
QByteArray | toDER () const |
DHPublicKey | toDH () const |
DSAPublicKey | toDSA () const |
QString | toPEM () const |
bool | toPEMFile (const QString &fileName) const |
RSAPublicKey | toRSA () const |
void | update (const MemoryRegion &a) |
bool | validSignature (const QByteArray &sig) |
bool | verifyMessage (const MemoryRegion &a, const QByteArray &sig, SignatureAlgorithm alg, SignatureFormat format=DefaultFormat) |
![]() | |
int | bitSize () const |
bool | canExport () const |
bool | canKeyAgree () const |
bool | isDH () const |
bool | isDSA () const |
bool | isNull () const |
bool | isPrivate () const |
bool | isPublic () const |
bool | isRSA () const |
bool | operator!= (const PKey &a) const |
PKey & | operator= (const PKey &from) |
bool | operator== (const PKey &a) const |
PKey () | |
PKey (const PKey &from) | |
PrivateKey | toPrivateKey () const |
PublicKey | toPublicKey () const |
Type | type () const |
![]() | |
Algorithm (const Algorithm &from) | |
void | change (Provider::Context *c) |
void | change (const QString &type, const QString &provider) |
Provider::Context * | context () |
const Provider::Context * | context () const |
Algorithm & | operator= (const Algorithm &from) |
Provider * | provider () const |
Provider::Context * | takeContext () |
QString | type () const |
Additional Inherited Members | |
![]() | |
enum | Type { RSA, DSA, DH } |
![]() | |
static PublicKey | fromDER (const QByteArray &a, ConvertResult *result=0, const QString &provider=QString()) |
static PublicKey | fromPEM (const QString &s, ConvertResult *result=0, const QString &provider=QString()) |
static PublicKey | fromPEMFile (const QString &fileName, ConvertResult *result=0, const QString &provider=QString()) |
![]() | |
static QList< Type > | supportedIOTypes (const QString &provider=QString()) |
static QList< Type > | supportedTypes (const QString &provider=QString()) |
![]() | |
PublicKey (const QString &type, const QString &provider) | |
![]() | |
PKey (const QString &type, const QString &provider) | |
void | set (const PKey &k) |
DHPrivateKey | toDHPrivateKey () const |
DHPublicKey | toDHPublicKey () const |
DSAPrivateKey | toDSAPrivateKey () const |
DSAPublicKey | toDSAPublicKey () const |
RSAPrivateKey | toRSAPrivateKey () const |
RSAPublicKey | toRSAPublicKey () const |
![]() | |
Algorithm () | |
Algorithm (const QString &type, const QString &provider) | |
RSA Public Key.
QCA::RSAPublicKey::RSAPublicKey | ( | ) |
Generate an empty RSA public key.
QCA::RSAPublicKey::RSAPublicKey | ( | const BigInteger & | n, |
const BigInteger & | e, | ||
const QString & | provider = QString() |
||
) |
Generate an RSA public key from specified parameters.
n | the public key value |
e | the public key exponent |
provider | the provider to use, if a particular provider is required |
QCA::RSAPublicKey::RSAPublicKey | ( | const RSAPrivateKey & | k | ) |
Extract the public key components from an RSA private key.
k | the private key to use as the basis for the public key |
BigInteger QCA::RSAPublicKey::n | ( | ) | const |
The public key value.
This value is the actual public key value (the product of p and q, the random prime numbers used to generate the RSA key), also known as the public modulus.
BigInteger QCA::RSAPublicKey::e | ( | ) | const |
The public key exponent.
This value is the exponent chosen in the original key generator step