Класс RSAPublicKey
#include <QtCrypto>
Диаграмма кооперации класса QCA::RSAPublicKey:

Публичные функции
| BigInteger | e () const |
| BigInteger | n () const |
| RSAPublicKey () | |
| RSAPublicKey (const BigInteger &n, const BigInteger &e, const QString &provider=QString()) | |
| RSAPublicKey (const RSAPrivateKey &k) |
Публичные функции, унаследованные от QCA::PublicKey
| 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 PublicKey &from) | |
| PublicKey (const QString &fileName) | |
| void | startVerify (SignatureAlgorithm alg, SignatureFormat format=DefaultFormat) |
| QByteArray | toDER () const |
| DHPublicKey | toDH () const |
| DSAPublicKey | toDSA () const |
| ECPublicKey | toEC () const |
| GOSTPublicKey | toGOST () 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) |
Публичные функции, унаследованные от QCA::PKey
| int | bitSize () const |
| bool | canExport () const |
| bool | canKeyAgree () const |
| bool | isDH () const |
| bool | isDSA () const |
| bool | isEC () const |
| bool | isGOST () 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 |
Публичные функции, унаследованные от QCA::Algorithm
| Algorithm (const Algorithm &from) | |
| void | change (const QString &type, const QString &provider) |
| void | change (Provider::Context *c) |
| Provider::Context * | context () |
| const Provider::Context * | context () const |
| Algorithm & | operator= (const Algorithm &from) |
| Provider * | provider () const |
| Provider::Context * | takeContext () |
| QString | type () const |
Дополнительные унаследованные члены
Публичные типы, унаследованные от QCA::PKey
| enum | Type { RSA , DSA , DH , EC , GOST , UNKNOWN } |
Статические публичные функции, унаследованные от QCA::PublicKey
| static PublicKey | fromDER (const QByteArray &a, ConvertResult *result=nullptr, const QString &provider=QString()) |
| static PublicKey | fromPEM (const QString &s, ConvertResult *result=nullptr, const QString &provider=QString()) |
| static PublicKey | fromPEMFile (const QString &fileName, ConvertResult *result=nullptr, const QString &provider=QString()) |
Статические публичные функции, унаследованные от QCA::PKey
| static QList<Type > | supportedIOTypes (const QString &provider=QString()) |
| static QList<Type > | supportedTypes (const QString &provider=QString()) |
Защищённые функции, унаследованные от QCA::PublicKey
| PublicKey (const QString &type, const QString &provider) |
Защищённые функции, унаследованные от QCA::PKey
| PKey (const QString &type, const QString &provider) | |
| void | set (const PKey &k) |
| DHPrivateKey | toDHPrivateKey () const |
| DHPublicKey | toDHPublicKey () const |
| DSAPrivateKey | toDSAPrivateKey () const |
| DSAPublicKey | toDSAPublicKey () const |
| ECPrivateKey | toECPrivateKey () const |
| ECPublicKey | toECPublicKey () const |
| GOSTPrivateKey | toGOSTPrivateKey () const |
| GOSTPublicKey | toGOSTPublicKey () const |
| RSAPrivateKey | toRSAPrivateKey () const |
| RSAPublicKey | toRSAPublicKey () const |
Защищённые функции, унаследованные от QCA::Algorithm
| Algorithm () |
| Algorithm (const QString &type, const QString &provider) |
Подробное описание
Открытый ключ RSA.
Описание конструкторов и деструктора
RSAPublicKey() [1/3]
| QCA::RSAPublicKey::RSAPublicKey () |
Генерирует пустой открытый ключ RSA.
RSAPublicKey() [2/3]
| QCA::RSAPublicKey::RSAPublicKey (const BigInteger & n, const BigInteger & e, const QString & provider = QString() ) |
Генерирует открытый ключ RSA на основе указанных параметров.
Параметры
| n | Значение публичного ключа |
| e | Экспонента публичного ключа |
| provider | Криптопровайдер, который будет использоваться, если требуется конкретный криптопровайдер |
RSAPublicKey() [3/3]
| QCA::RSAPublicKey::RSAPublicKey (const RSAPrivateKey & k) |
Извлекает компоненты открытого ключа из закрытого ключа RSA.
Параметры
| k | Закрытый ключ для использования в качестве основы для открытого ключа |
Описание методов
n()
| BigInteger QCA::RSAPublicKey::n () const |
Значение публичного ключа.
Это значение является фактическим значением открытого ключа (произведение p и q, случайных
простых чисел, используемых для генерации ключа RSA), также известное как открытый модуль.
e()
| BigInteger QCA::RSAPublicKey::e () const |
Экспонента публичного ключа.
Это значение представляет собой экспоненту, выбранную на шаге генерации оригинального ключа.