easyssl 0.51.8d8e9a5
EasySSL is base back end library for your c++ Qt projects.
EasySSL::ICrypto Class Referenceabstract

The ICrypto class, This is base interface that provide encryption functionality. More...

#include <icrypto.h>

Public Types

enum  Features { Signing = 0x01 , Encryption = 0x02 }
 The Features enum this is list of the supported description features. More...
 

Public Member Functions

bool makeKeys (QByteArray &pubKey, QByteArray &privKey) const
 makeKeys This method generate the public and private keys of the ECDSA.
 
virtual QSsl::KeyAlgorithm keyAlgorithm () const =0
 keyAlgorithm This method should be return Qt Key algorithm (needed for generate cetrificates.)
 
virtual Features supportedFeatures () const =0
 supportedFeatures This method should return supported featurs of the current encryption algorithm
 
virtual QByteArray decrypt (const QByteArray &message, const QByteArray &key)=0
 decrypt This method decrypt message using key.
 
virtual QByteArray encrypt (const QByteArray &message, const QByteArray &key)=0
 encrypt This method encrypt message using key.
 
virtual QByteArray signMessage (const QByteArray &message, const QByteArray &key) const =0
 signMessage This method should be sign the message using the key.
 
virtual bool checkSign (const QByteArray &message, const QByteArray &signature, const QByteArray &key) const =0
 checkSign This method should be check signature of the message using the key.
 
virtual void * makeRawKeys () const =0
 makeKeys This method generate the public and private keys of the ECDSA.
 

Detailed Description

The ICrypto class, This is base interface that provide encryption functionality.

Definition at line 21 of file icrypto.h.

Inheritance diagram for EasySSL::ICrypto:
Inheritance graph
Collaboration diagram for EasySSL::ICrypto:
Collaboration graph

Member Enumeration Documentation

◆ Features

The Features enum this is list of the supported description features.

Enumerator
Signing 

Signin and check sign of the data.

Encryption 

Encryption and decryption data.

Definition at line 29 of file icrypto.h.

Member Function Documentation

◆ checkSign()

virtual bool EasySSL::ICrypto::checkSign ( const QByteArray &  message,
const QByteArray &  signature,
const QByteArray &  key 
) const
pure virtual

checkSign This method should be check signature of the message using the key.

Parameters
messageThis is input data that should be decrypted.
signatureThis is signature that will be checked for the message.
keyThis is a public key for encryption the inpputData.
Returns
decrypted data array.
See also
AsyncKeysAuth::encrypt

Implemented in EasySSL::ECDSASSL, and EasySSL::RSASSL.

◆ decrypt()

virtual QByteArray EasySSL::ICrypto::decrypt ( const QByteArray &  message,
const QByteArray &  key 
)
pure virtual

decrypt This method decrypt message using key.

Parameters
messageThis is encrypted message that should be decrypted.
keyThis is key that will be used for decryption for the message.
Returns
decrypted message or empty string if method not supported or decrypted failed.
See also
IAsyncEncryption::encrypt

Implemented in EasySSL::ECDSASSL, and EasySSL::RSASSL.

◆ encrypt()

virtual QByteArray EasySSL::ICrypto::encrypt ( const QByteArray &  message,
const QByteArray &  key 
)
pure virtual

encrypt This method encrypt message using key.

Parameters
messageThis is a message that should be decrypted.
keyThis is key that will be used for encryption for the message.
Returns
decrypted message or empty string if method not supported or decrypted failed.
See also
IAsyncEncryption::encrypt

Implemented in EasySSL::ECDSASSL, and EasySSL::RSASSL.

◆ keyAlgorithm()

virtual QSsl::KeyAlgorithm EasySSL::ICrypto::keyAlgorithm ( ) const
pure virtual

keyAlgorithm This method should be return Qt Key algorithm (needed for generate cetrificates.)

Returns

Implemented in EasySSL::ECDSASSL, and EasySSL::RSASSL.

◆ makeKeys()

bool EasySSL::ICrypto::makeKeys ( QByteArray &  pubKey,
QByteArray &  privKey 
) const

makeKeys This method generate the public and private keys of the ECDSA.

Parameters
pubKeyThis is result public key.
privKeyThis is result private key.
Returns
true if keys generated successful.

Definition at line 16 of file icrypto.cpp.

Here is the call graph for this function:

◆ makeRawKeys()

virtual void * EasySSL::ICrypto::makeRawKeys ( ) const
pure virtual

makeKeys This method generate the public and private keys of the ECDSA.

Returns
pointer to generated keys. This method must return EVP_PKEY* structure.

Implemented in EasySSL::ECDSASSL, and EasySSL::RSASSL.

◆ signMessage()

virtual QByteArray EasySSL::ICrypto::signMessage ( const QByteArray &  message,
const QByteArray &  key 
) const
pure virtual

signMessage This method should be sign the message using the key.

Parameters
messageThis is input data that should be signed.
keyThis is a privete key for encryption the message.
Returns
signature data array.
See also
AsyncKeysAuth::descrupt

Implemented in EasySSL::ECDSASSL, and EasySSL::RSASSL.

◆ supportedFeatures()

virtual Features EasySSL::ICrypto::supportedFeatures ( ) const
pure virtual

supportedFeatures This method should return supported featurs of the current encryption algorithm

Returns
Features list.
See also
Features

Implemented in EasySSL::ECDSASSL, and EasySSL::RSASSL.


The documentation for this class was generated from the following files: