easyssl 0.50.142aaef
EasySSL is base back end library for your c++ Qt projects.
EasySSL::RSASSL Class Reference

The RSASSL class This is wrapper for RSA algorithm of openssl 3.0 libraryry. More...

#include <rsassl.h>

Public Member Functions

 RSASSL (RSAPadding padding=PKCS1_OAEP_PADDING)
 
void * makeRawKeys () const override
 makeKeys This method generate the public and private keys of the ECDSA.
 
Features supportedFeatures () const override
 supportedFeatures This method should return supported featurs of the current encryption algorithm
 
QSsl::KeyAlgorithm keyAlgorithm () const override
 keyAlgorithm This method should be return Qt Key algorithm (needed for generate cetrificates.)
 
QByteArray signMessage (const QByteArray &inputData, const QByteArray &key) const override
 signMessage This method should be sign the message using the key.
 
bool checkSign (const QByteArray &inputData, const QByteArray &signature, const QByteArray &key) const override
 checkSign This method should be check signature of the message using the key.
 
QByteArray decrypt (const QByteArray &message, const QByteArray &key) override
 decrypt This method has empty implementation.
 
QByteArray encrypt (const QByteArray &message, const QByteArray &key) override
 encrypt This method has empty implementation.
 
RSAPadding padding () const
 padding This is mode of pending data before icnription.
 
void setPadding (RSAPadding newPadding)
 setPadding This method sets new mode for encryption pendong.
 
RSABits bits () const
 bits return cuurrent rsa keys size mode. Using oly for generate keys.
 
void setBits (RSABits newBits)
 setBits sets new value of the rsa key generator.
 
- Public Member Functions inherited from EasySSL::ICrypto
bool makeKeys (QByteArray &pubKey, QByteArray &privKey) const
 makeKeys This method generate the public and private keys of the ECDSA.
 

Additional Inherited Members

- Public Types inherited from EasySSL::ICrypto
enum  Features { Signing = 0x01 , Encryption = 0x02 }
 The Features enum this is list of the supported description features. More...
 

Detailed Description

The RSASSL class This is wrapper for RSA algorithm of openssl 3.0 libraryry.

Definition at line 20 of file rsassl.h.

Inheritance diagram for EasySSL::RSASSL:
Inheritance graph
Collaboration diagram for EasySSL::RSASSL:
Collaboration graph

Constructor & Destructor Documentation

◆ RSASSL()

EasySSL::RSASSL::RSASSL ( RSAPadding  padding = PKCS1_OAEP_PADDING)

Definition at line 20 of file rsassl.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ bits()

RSASSL::RSABits EasySSL::RSASSL::bits ( ) const

bits return cuurrent rsa keys size mode. Using oly for generate keys.

Returns
size of the rsa keys.

Definition at line 295 of file rsassl.cpp.

◆ checkSign()

bool EasySSL::RSASSL::checkSign ( const QByteArray &  message,
const QByteArray &  signature,
const QByteArray &  key 
) const
overridevirtual

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

Implements EasySSL::ICrypto.

Definition at line 99 of file rsassl.cpp.

Here is the call graph for this function:

◆ decrypt()

QByteArray EasySSL::RSASSL::decrypt ( const QByteArray &  message,
const QByteArray &  key 
)
overridevirtual

decrypt This method has empty implementation.

Returns
empty array.

Implements EasySSL::ICrypto.

Definition at line 136 of file rsassl.cpp.

Here is the call graph for this function:

◆ encrypt()

QByteArray EasySSL::RSASSL::encrypt ( const QByteArray &  message,
const QByteArray &  key 
)
overridevirtual

encrypt This method has empty implementation.

Returns
empty array.

Implements EasySSL::ICrypto.

Definition at line 205 of file rsassl.cpp.

Here is the call graph for this function:

◆ keyAlgorithm()

QSsl::KeyAlgorithm EasySSL::RSASSL::keyAlgorithm ( ) const
overridevirtual

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

Returns

Implements EasySSL::ICrypto.

Definition at line 44 of file rsassl.cpp.

◆ makeRawKeys()

void * EasySSL::RSASSL::makeRawKeys ( ) const
overridevirtual

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

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

Implements EasySSL::ICrypto.

Definition at line 24 of file rsassl.cpp.

Here is the call graph for this function:

◆ padding()

RSASSL::RSAPadding EasySSL::RSASSL::padding ( ) const

padding This is mode of pending data before icnription.

Returns
encryption pending mode.

Definition at line 266 of file rsassl.cpp.

Here is the caller graph for this function:

◆ setBits()

void EasySSL::RSASSL::setBits ( RSABits  newBits)

setBits sets new value of the rsa key generator.

Parameters
newBitsthis is new value of the key size of rsa.

Definition at line 299 of file rsassl.cpp.

◆ setPadding()

void EasySSL::RSASSL::setPadding ( RSAPadding  newPadding)

setPadding This method sets new mode for encryption pendong.

Parameters
newPaddingThis is new new mode.
Note
You must change padding mode for both side (encryption and decryption)

Definition at line 270 of file rsassl.cpp.

Here is the caller graph for this function:

◆ signMessage()

QByteArray EasySSL::RSASSL::signMessage ( const QByteArray &  message,
const QByteArray &  key 
) const
overridevirtual

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

Implements EasySSL::ICrypto.

Definition at line 48 of file rsassl.cpp.

Here is the call graph for this function:

◆ supportedFeatures()

ICrypto::Features EasySSL::RSASSL::supportedFeatures ( ) const
overridevirtual

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

Returns
Features list.
See also
Features

Implements EasySSL::ICrypto.

Definition at line 40 of file rsassl.cpp.


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