Sailfish Crypto
API DocumentationCryptoManager Class
(Sailfish::Crypto::CryptoManager)Allows clients to make requests of the system crypto service. More...
Header: | #include <Crypto/cryptomanager.h> |
Instantiated By: | CryptoManager |
Public Types
enum | Algorithm { AlgorithmUnknown, AlgorithmCustom, FirstAsymmetricAlgorithm, AlgorithmRsa, ..., LastAlgorithm } |
enum | BlockMode { BlockModeUnknown, BlockModeCustom, BlockModeEcb, BlockModeCbc, ..., LastBlockMode } |
enum | DigestFunction { DigestUnknown, DigestCustom, DigestMd5, DigestSha1, ..., LastDigestFunction } |
enum | EllipticCurve { CurveUnknown, CurveSect163k1, CurveSect163r1, CurveSect163r2, ..., LastCurve } |
enum | EncryptionPadding { EncryptionPaddingUnknown, EncryptionPaddingCustom, EncryptionPaddingNone, EncryptionPaddingPkcs7, ..., LastEncryptionPadding } |
enum | KeyDerivationFunction { KdfUnknown, KdfCustom, KdfPkcs5Pbkdf2, KdfHkdf, ..., LastKdf } |
enum | MessageAuthenticationCode { MacUnknown, MacCustom, MacHmac, MacCmac, ..., LastMac } |
enum | Operation { OperationUnknown, OperationCustom, OperationSign, OperationVerify, ..., OperationDeriveKey } |
flags | Operations |
enum | SignaturePadding { SignaturePaddingUnknown, SignaturePaddingCustom, SignaturePaddingNone, SignaturePaddingRsaPss, ..., LastSignaturePadding } |
flags | VerificationStatus |
enum | VerificationStatusType { VerificationStatusUnknown, VerificationSucceeded, VerificationFailed, VerificationSignatureInvalid, ..., VerificationKeyInvalid } |
Public Functions
CryptoManager(QObject *parent = Q_NULLPTR) | |
virtual | ~CryptoManager() |
bool | isInitialized() const |
Detailed Description
Allows clients to make requests of the system crypto service.
The CryptoManager class provides an interface to the system crypto service. In order to perform requests, clients should use the Request type specific for their needs:
- PluginInfoRequest to retrieve information about available crypto plugins
- LockCodeRequest to set the lock code for, lock, or unlock a crypto plugin
- SeedRandomDataGeneratorRequest to seed a crypto plugin's random number generator
- GenerateRandomDataRequest to generate random data
- GenerateKeyRequest to generate a Key
- GenerateStoredKeyRequest to generate a securely-stored Key
- ImportKeyRequest to import a Key from a data file
- ImportStoredKeyRequest to import a Key from a data file and store it securely
- StoredKeyRequest to retrieve a securely-stored Key
- StoredKeyIdentifiersRequest to retrieve the identifiers of securely-stored Keys
- DeleteStoredKeyRequest to delete a securely-stored Key
- EncryptRequest to encrypt data with a given Key
- DecryptRequest to decrypt data with a given Key
- CalculateDigestRequest to calculate a digest (non-keyed hash) of some data
- SignRequest to generate a signature for some data with a given Key
- VerifyRequest to verify if a signature was generated with a given Key
- CipherRequest to start a cipher session with which to encrypt, decrypt, sign or verify a stream of data
Member Type Documentation
enum CryptoManager::Algorithm
enum CryptoManager::BlockMode
enum CryptoManager::DigestFunction
enum CryptoManager::EllipticCurve
enum CryptoManager::EncryptionPadding
enum CryptoManager::KeyDerivationFunction
enum CryptoManager::MessageAuthenticationCode
enum CryptoManager::Operation
flags CryptoManager::Operations
The Operations type is a typedef for QFlags<Operation>. It stores an OR combination of Operation values.
enum CryptoManager::SignaturePadding
enum CryptoManager::VerificationStatusType
flags CryptoManager::VerificationStatus
The VerificationStatus type is a typedef for QFlags<VerificationStatusType>. It stores an OR combination of VerificationStatusType values.
Member Function Documentation
CryptoManager::CryptoManager(QObject *parent = Q_NULLPTR)
Constructs a new CryptoManager instance with the given parent.
[virtual]
CryptoManager::~CryptoManager()
Destroys the CryptoManager.
bool CryptoManager::isInitialized() const
Returns true if the manager is initialized and can be used to perform requests.