Sailfish Crypto
API DocumentationDecryptRequest Class
(Sailfish::Crypto::DecryptRequest)Allows a client request that the system crypto service decrypt data with a specific key. More...
Header: | #include <Crypto/decryptrequest.h> |
Instantiated By: | DecryptRequest |
Inherits: | Sailfish::Crypto::Request |
Properties
|
|
- 4 properties inherited from Sailfish::Crypto::Request
Public Functions
DecryptRequest(QObject *parent = Q_NULLPTR) | |
~DecryptRequest() | |
QByteArray | authenticationData() const |
QByteArray | authenticationTag() const |
Sailfish::Crypto::CryptoManager::BlockMode | blockMode() const |
QString | cryptoPluginName() const |
QByteArray | data() const |
QByteArray | initializationVector() const |
Sailfish::Crypto::Key | key() const |
Sailfish::Crypto::CryptoManager::EncryptionPadding | padding() const |
QByteArray | plaintext() const |
void | setAuthenticationData(const QByteArray &data) |
void | setAuthenticationTag(const QByteArray &authenticationTag) |
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) |
Sailfish::Crypto::CryptoManager::VerificationStatus | verificationStatus() const |
Reimplemented Public Functions
virtual QVariantMap | customParameters() const |
virtual Sailfish::Crypto::CryptoManager * | manager() const |
virtual Sailfish::Crypto::Result | result() const |
virtual void | setCustomParameters(const QVariantMap ¶ms) |
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 | cryptoPluginNameChanged() |
void | dataChanged() |
void | initializationVectorChanged() |
void | keyChanged() |
void | paddingChanged() |
void | plaintextChanged() |
void | verificationStatusChanged() |
- 4 signals inherited from Sailfish::Crypto::Request
Detailed Description
Allows a client request that the system crypto service decrypt data with a specific key.
Property Documentation
authenticationData : QByteArray
Access functions:
QByteArray | authenticationData() const |
void | setAuthenticationData(const QByteArray &data) |
Notifier signal:
void | authenticationDataChanged() |
authenticationTag : QByteArray
Access functions:
QByteArray | authenticationTag() const |
void | setAuthenticationTag(const QByteArray &authenticationTag) |
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() |
cryptoPluginName : QString
Access functions:
QString | cryptoPluginName() const |
void | setCryptoPluginName(const QString &pluginName) |
Notifier signal:
void | cryptoPluginNameChanged() |
data : QByteArray
Access functions:
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() |
plaintext : const QByteArray
Access functions:
QByteArray | plaintext() const |
Notifier signal:
void | plaintextChanged() |
verificationStatus : const Sailfish::Crypto::CryptoManager::VerificationStatus
Access functions:
Sailfish::Crypto::CryptoManager::VerificationStatus | verificationStatus() const |
Notifier signal:
void | verificationStatusChanged() |
Member Function Documentation
DecryptRequest::DecryptRequest(QObject *parent = Q_NULLPTR)
Constructs a new DecryptRequest object with the given parent.
DecryptRequest::~DecryptRequest()
Destroys the DecryptRequest
QByteArray DecryptRequest::authenticationData() const
Returns the authentication data for the decrypt operation
Note: Getter function for property authenticationData.
See also setAuthenticationData().
QByteArray DecryptRequest::authenticationTag() const
Returns the authentication tag for the decrypt operation
Note: Getter function for property authenticationTag.
See also setAuthenticationTag().
Sailfish::Crypto::CryptoManager::BlockMode DecryptRequest::blockMode() const
Returns the block mode to be used when decrypting the data
Note: Getter function for property blockMode.
See also setBlockMode().
QString DecryptRequest::cryptoPluginName() const
Returns the name of the crypto plugin which the client wishes to perform the decryption operation
Note: Getter function for property cryptoPluginName.
See also setCryptoPluginName().
[virtual]
QVariantMap DecryptRequest::customParameters() const
See also setCustomParameters().
QByteArray DecryptRequest::data() const
Returns the data which the client wishes to decrypt
Note: Getter function for property data.
See also setData().
QByteArray DecryptRequest::initializationVector() const
Returns the initialization vector which the client wishes to use when decrypting the data
Note: Getter function for property initializationVector.
See also setInitializationVector().
Sailfish::Crypto::Key DecryptRequest::key() const
Returns the key the client wishes to be used to decrypt data
Note: Getter function for property key.
See also setKey().
[virtual]
Sailfish::Crypto::CryptoManager *DecryptRequest::manager() const
See also setManager().
Sailfish::Crypto::CryptoManager::EncryptionPadding DecryptRequest::padding() const
Returns the encryption padding mode to be used when decrypting the data
Note: Getter function for property padding.
See also setPadding().
QByteArray DecryptRequest::plaintext() const
Returns the plaintext result of the decryption operation.
Note: this value is only valid if the status of the request is Request::Finished.
Note: Getter function for property plaintext.
[virtual]
Sailfish::Crypto::Result DecryptRequest::result() const
void DecryptRequest::setAuthenticationData(const QByteArray &data)
Sets the authentication data for the decrypt operation
This is only required if performing an authenticated decryption.
Note: Setter function for property authenticationData.
See also authenticationData().
void DecryptRequest::setAuthenticationTag(const QByteArray &authenticationTag)
Sets the authentication tag for the decrypt operation
This is only required if performing an authenticated decryption.
Note: Setter function for property authenticationTag.
See also authenticationTag().
void DecryptRequest::setBlockMode(Sailfish::Crypto::CryptoManager::BlockMode mode)
Sets the block mode to be used when decrypting the data to the given mode
Note: Setter function for property blockMode.
See also blockMode().
void DecryptRequest::setCryptoPluginName(const QString &pluginName)
Sets the name of the crypto plugin which the client wishes to perform the decryption operation to pluginName
Note: Setter function for property cryptoPluginName.
See also cryptoPluginName().
[virtual]
void DecryptRequest::setCustomParameters(const QVariantMap ¶ms)
See also customParameters().
void DecryptRequest::setData(const QByteArray &data)
Sets the data which the client wishes to decrypt to data
Note: Setter function for property data.
See also data().
void DecryptRequest::setInitializationVector(const QByteArray &iv)
Sets the initialization vector which the client wishes to use when decrypting 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 DecryptRequest::setManager(Sailfish::Crypto::CryptoManager *manager)
See also manager().
void DecryptRequest::setPadding(Sailfish::Crypto::CryptoManager::EncryptionPadding padding)
Sets the encryption padding mode to be used when decrypting the data to the given padding
Note: Setter function for property padding.
See also padding().
[virtual]
void DecryptRequest::startRequest()
Reimplemented from Request::startRequest().
Starts a decryption operation.
If authenticationData has been set, the decryption operation will be authenticated using the authenticationData and authenticationTag values.
[virtual]
Sailfish::Crypto::Request::Status DecryptRequest::status() const
Sailfish::Crypto::CryptoManager::VerificationStatus DecryptRequest::verificationStatus() const
Returns the verification result of the decryption operation.
Note: this value is only valid if the status of the request is Request::Finished.
Note: Getter function for property verificationStatus.