Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

Sailfish Crypto

API Documentation
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Public Types
  • Properties
  • Public Functions
  • Detailed Description

KeyPairGenerationParameters Class

(Sailfish::Crypto::KeyPairGenerationParameters)

Encapsulates parameters related to the generation of an asymmetric cryptographic key pair More...

Header: #include <Crypto/keypairgenerationparameters.h>
Instantiated By: KeyPairGenerationParameters
Inherited By:

Sailfish::Crypto::DhKeyPairGenerationParameters, Sailfish::Crypto::DsaKeyPairGenerationParameters, Sailfish::Crypto::EcKeyPairGenerationParameters, and Sailfish::Crypto::RsaKeyPairGenerationParameters

  • List of all members, including inherited members

Public Types

enum KeyPairType { KeyPairUnknown, KeyPairCustom, KeyPairDh, KeyPairDsa, ..., LastKeyPairType }

Properties

  • customParameters : QVariantMap
  • keyPairType : KeyPairType

Public Functions

KeyPairGenerationParameters()
KeyPairGenerationParameters(const KeyPairGenerationParameters &other)
virtual ~KeyPairGenerationParameters()
QVariantMap customParameters() const
virtual bool isValid() const
KeyPairType keyPairType() const
void setCustomParameters(const QVariantMap &params)
void setKeyPairType(KeyPairType type)
QVariantMap subclassParameters() const
KeyPairGenerationParameters &operator=(const KeyPairGenerationParameters &other)

Detailed Description

Encapsulates parameters related to the generation of an asymmetric cryptographic key pair

This class encapsulates a variety of parameters which will affect how the crypto plugin generates a key pair when fulfilling a GenerateStoredKeyRequest.

This base class is only useful for plugin-specific key-pair generation (where the keyPairType() is specified to be KeyPairGenerationParameters::KeyPairCustom and the client has specified a variety of customParameters()).

Most clients will want to use one of the derived types such as EcKeyPairGenerationParameters, RsaKeyPairGenerationParameters, DsaKeyPairGenerationParameters or DhKeyPairGenerationParameters.

Member Type Documentation

enum KeyPairGenerationParameters::KeyPairType

Property Documentation

customParameters : QVariantMap

Access functions:

QVariantMap customParameters() const
void setCustomParameters(const QVariantMap &params)

keyPairType : KeyPairType

Access functions:

KeyPairType keyPairType() const
void setKeyPairType(KeyPairType type)

Member Function Documentation

KeyPairGenerationParameters::KeyPairGenerationParameters()

Constructs a new, empty KeyPairGenerationParameters instance

KeyPairGenerationParameters::KeyPairGenerationParameters(const KeyPairGenerationParameters &other)

Constructs a copy of the other KeyPairGenerationParameters instance

[virtual] KeyPairGenerationParameters::~KeyPairGenerationParameters()

Destroys the KeyPairGenerationParameters instance

QVariantMap KeyPairGenerationParameters::customParameters() const

Returns the plugin-specific custom parameters which will be used during key generation

Note: Getter function for property customParameters.

See also setCustomParameters().

[virtual] bool KeyPairGenerationParameters::isValid() const

Returns true if enough parameters have been provided so that the plugin can generate a key pair

This is assumed to be true if the keyPairType() is KeyPairGenerationParameters::KeyPairCustom and some customParameters() exist, otherwise the validity of the parameters depends on the type of key pair to be generated and the specific values specified as parameters for generating that type of key pair.

Note that this function cannot determine whether the individual parameters themselves are valid or invalid, as no assumptions about parameter validity are encoded within the client API; hence the plugin may still return an error for parameters which are deemed valid (since they exist) but are erroneously specified (e.g. a prime number which isn't prime).

KeyPairType KeyPairGenerationParameters::keyPairType() const

Returns the type of key pair which should be generated

Note: Getter function for property keyPairType.

See also setKeyPairType().

void KeyPairGenerationParameters::setCustomParameters(const QVariantMap &params)

Sets the plugin-specific custom parameters to be used during key generation to params

Note: Setter function for property customParameters.

See also customParameters().

void KeyPairGenerationParameters::setKeyPairType(KeyPairType type)

Sets the type of key pair which should be generated to type

Note: Setter function for property keyPairType.

See also keyPairType().

QVariantMap KeyPairGenerationParameters::subclassParameters() const

Returns the algorithm-specific parameters which will be used during key generation

KeyPairGenerationParameters &KeyPairGenerationParameters::operator=(const KeyPairGenerationParameters &other)

Assigns the other KeyPairGenerationParameters instance to this

  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn