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

  • Properties
  • Public Functions
  • Reimplemented Public Functions
  • Signals
  • Detailed Description

EncryptRequest Class

(Sailfish::Crypto::EncryptRequest)

Allows a client request that the system crypto service encrypt data with a specific key. More...

Header: #include <Crypto/encryptrequest.h>
Instantiated By: EncryptRequest
Inherits: Sailfish::Crypto::Request
  • List of all members, including inherited members

Properties

  • authenticationData : QByteArray
  • authenticationTag : const QByteArray
  • blockMode : Sailfish::Crypto::CryptoManager::BlockMode
  • ciphertext : const QByteArray
  • cryptoPluginName : QString
  • data : QByteArray
  • initializationVector : QByteArray
  • key : Sailfish::Crypto::Key
  • padding : Sailfish::Crypto::CryptoManager::EncryptionPadding
  • 4 properties inherited from Sailfish::Crypto::Request

Public Functions

EncryptRequest(QObject *parent = Q_NULLPTR)
~EncryptRequest()
QByteArray authenticationData() const
QByteArray authenticationTag() const
Sailfish::Crypto::CryptoManager::BlockMode blockMode() const
QByteArray ciphertext() const
QString cryptoPluginName() const
QByteArray data() const
QByteArray initializationVector() const
Sailfish::Crypto::Key key() const
Sailfish::Crypto::CryptoManager::EncryptionPadding padding() const
void setAuthenticationData(const QByteArray &data)
void setBlockMode(Sailfish::Crypto::CryptoManager::BlockMode mode)
void setCryptoPluginName(const QString &pluginName)
void setData(const QByteArray &data)
void setInitializationVector(const QByteArray &iv)
void setKey(const Sailfish::Crypto::Key &key)
void setPadding(Sailfish::Crypto::CryptoManager::EncryptionPadding padding)

Reimplemented Public Functions

virtual QVariantMap customParameters() const
virtual Sailfish::Crypto::CryptoManager *manager() const
virtual Sailfish::Crypto::Result result() const
virtual void setCustomParameters(const QVariantMap &params)
virtual void setManager(Sailfish::Crypto::CryptoManager *manager)
virtual void startRequest()
virtual Sailfish::Crypto::Request::Status status() const
virtual void waitForFinished()
  • 8 public functions inherited from Sailfish::Crypto::Request

Signals

void authenticationDataChanged()
void authenticationTagChanged()
void blockModeChanged()
void ciphertextChanged()
void cryptoPluginNameChanged()
void dataChanged()
void initializationVectorChanged()
void keyChanged()
void paddingChanged()
  • 4 signals inherited from Sailfish::Crypto::Request

Detailed Description

Allows a client request that the system crypto service encrypt data with a specific key.

Property Documentation

authenticationData : QByteArray

Access functions:

QByteArray authenticationData() const
void setAuthenticationData(const QByteArray &data)

Notifier signal:

void authenticationDataChanged()

authenticationTag : const QByteArray

Access functions:

QByteArray authenticationTag() const

Notifier signal:

void authenticationTagChanged()

blockMode : Sailfish::Crypto::CryptoManager::BlockMode

Access functions:

Sailfish::Crypto::CryptoManager::BlockMode blockMode() const
void setBlockMode(Sailfish::Crypto::CryptoManager::BlockMode mode)

Notifier signal:

void blockModeChanged()

ciphertext : const QByteArray

Access functions:

QByteArray ciphertext() const

Notifier signal:

void ciphertextChanged()

cryptoPluginName : QString

Access functions:

QString cryptoPluginName() const
void setCryptoPluginName(const QString &pluginName)

Notifier signal:

void cryptoPluginNameChanged()

data : QByteArray

Access functions:

QByteArray data() const
void setData(const QByteArray &data)

Notifier signal:

void dataChanged()

initializationVector : QByteArray

Access functions:

QByteArray initializationVector() const
void setInitializationVector(const QByteArray &iv)

Notifier signal:

void initializationVectorChanged()

key : Sailfish::Crypto::Key

Access functions:

Sailfish::Crypto::Key key() const
void setKey(const Sailfish::Crypto::Key &key)

Notifier signal:

void keyChanged()

padding : Sailfish::Crypto::CryptoManager::EncryptionPadding

Access functions:

Sailfish::Crypto::CryptoManager::EncryptionPadding padding() const
void setPadding(Sailfish::Crypto::CryptoManager::EncryptionPadding padding)

Notifier signal:

void paddingChanged()

Member Function Documentation

EncryptRequest::EncryptRequest(QObject *parent = Q_NULLPTR)

Constructs a new EncryptRequest object which interfaces to the system crypto service via the given manager, with the given parent.

EncryptRequest::~EncryptRequest()

Destroys the EncryptRequest

QByteArray EncryptRequest::authenticationData() const

Returns the authentication data for the encrypt operation

Note: Getter function for property authenticationData.

See also setAuthenticationData().

QByteArray EncryptRequest::authenticationTag() const

Returns the authentication tag for the encryption operation.

Note: this value is only valid if an authenticated encryption was performed and the status of the request is Request::Finished.

Note: Getter function for property authenticationTag.

Sailfish::Crypto::CryptoManager::BlockMode EncryptRequest::blockMode() const

Returns the block mode which should be used when encrypting the data

Note: Getter function for property blockMode.

See also setBlockMode().

QByteArray EncryptRequest::ciphertext() const

Returns the ciphertext result of the encryption operation.

Note: this value is only valid if the status of the request is Request::Finished.

Note: Getter function for property ciphertext.

QString EncryptRequest::cryptoPluginName() const

Returns the name of the crypto plugin which the client wishes to perform the encryption operation

Note: Getter function for property cryptoPluginName.

See also setCryptoPluginName().

[virtual] QVariantMap EncryptRequest::customParameters() const

See also setCustomParameters().

QByteArray EncryptRequest::data() const

Returns the data which the client wishes the system service to encrypt

Note: Getter function for property data.

See also setData().

QByteArray EncryptRequest::initializationVector() const

Returns the initialization vector which the client wishes to use when encrypting the data

Note: Getter function for property initializationVector.

See also setInitializationVector().

Sailfish::Crypto::Key EncryptRequest::key() const

Returns the key which the client wishes the system service to use to encrypt the data

Note: Getter function for property key.

See also setKey().

[virtual] Sailfish::Crypto::CryptoManager *EncryptRequest::manager() const

See also setManager().

Sailfish::Crypto::CryptoManager::EncryptionPadding EncryptRequest::padding() const

Returns the encryption padding mode which should be used when encrypting the data

Note: Getter function for property padding.

See also setPadding().

[virtual] Sailfish::Crypto::Result EncryptRequest::result() const

void EncryptRequest::setAuthenticationData(const QByteArray &data)

Sets the authentication data for the encrypt operation

This is only required if performing an authenticated encryption.

Note: Setter function for property authenticationData.

See also authenticationData().

void EncryptRequest::setBlockMode(Sailfish::Crypto::CryptoManager::BlockMode mode)

Sets the block mode which should be used when encrypting the data to mode

Note: Setter function for property blockMode.

See also blockMode().

void EncryptRequest::setCryptoPluginName(const QString &pluginName)

Sets the name of the crypto plugin which the client wishes to perform the encryption operation to pluginName

Note: Setter function for property cryptoPluginName.

See also cryptoPluginName().

[virtual] void EncryptRequest::setCustomParameters(const QVariantMap &params)

See also customParameters().

void EncryptRequest::setData(const QByteArray &data)

Sets the data which the client wishes the system service to encrypt to data

Note: Setter function for property data.

See also data().

void EncryptRequest::setInitializationVector(const QByteArray &iv)

Sets the initialization vector which the client wishes to use when encrypting the data to iv

Note that this is only applicable for certain key types using certain modes of encryption (e.g. CBC mode with AES symmetric keys).

The client must specify the same initialization vector when decrypting the cipher text as they used when encrypting it. The initialization vector is not secret, and can be stored along with the ciphertext, however it should be generated using a cryptographically secure random number generator (see GenerateRandomDataRequest) and must be the appropriate size according to the cipher.

Note: Setter function for property initializationVector.

See also initializationVector().

[virtual] void EncryptRequest::setManager(Sailfish::Crypto::CryptoManager *manager)

See also manager().

void EncryptRequest::setPadding(Sailfish::Crypto::CryptoManager::EncryptionPadding padding)

Sets the encryption padding mode which should be used when encrypting the data to padding

Note: Setter function for property padding.

See also padding().

[virtual] void EncryptRequest::startRequest()

Reimplemented from Request::startRequest().

Starts an encryption operation.

If authenticationData has been set, the encryption operation will be authenticated using the authenticationData.

[virtual] Sailfish::Crypto::Request::Status EncryptRequest::status() const

[virtual] void EncryptRequest::waitForFinished()

  • Legal
  • Contact Us
  • Jollyboys Ltd © 2024

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn