#include <SymmetricCipher.h>
|
| SymmetricCipher (const SecurityProtocol &pSecurityProtocol, const QByteArray &pKeyBytes) |
| Creates a new instance with cipher algorithm determined by parameter and specified cipher key.
|
| ~SymmetricCipher () |
bool | isInitialized () const |
| Returns true, if initialization succeeded, i.e.
|
QByteArray | encrypt (const QByteArray &pPlainData) |
| Encrypts the message.
|
QByteArray | decrypt (const QByteArray &pEncryptedData) |
| Decrypts the message.
|
bool | setIv (const QByteArray &pIv) |
| Sets the initialization vector.
|
int | getBlockSize () const |
◆ SymmetricCipher()
SymmetricCipher::SymmetricCipher |
( |
const SecurityProtocol & | pSecurityProtocol, |
|
|
const QByteArray & | pKeyBytes ) |
Creates a new instance with cipher algorithm determined by parameter and specified cipher key.
- Parameter
-
pSecurityProtocol | will determine the cipher algorithm to use. E.g. a PACE protocol of id_PACE::DH::GM_AES_CBC_CMAC_128 will result in AES to be used. |
pKeyBytes | the bytes of the key |
◆ ~SymmetricCipher()
SymmetricCipher::~SymmetricCipher |
( |
| ) |
|
◆ decrypt()
QByteArray SymmetricCipher::decrypt |
( |
const QByteArray & | pEncryptedData | ) |
|
Decrypts the message.
- Parameter
-
pEncryptedData | the message to decrypt. |
- Rückgabe
- the decrypted message
◆ encrypt()
QByteArray SymmetricCipher::encrypt |
( |
const QByteArray & | pPlainData | ) |
|
Encrypts the message.
- Parameter
-
pPlainData | the message to encrypt. |
- Rückgabe
- the encrypted message
◆ getBlockSize()
int SymmetricCipher::getBlockSize |
( |
| ) |
const |
|
nodiscard |
◆ isInitialized()
bool SymmetricCipher::isInitialized |
( |
| ) |
const |
|
nodiscard |
Returns true, if initialization succeeded, i.e.
the algorithm is known, supported and the key bytes have correct size.
◆ setIv()
bool SymmetricCipher::setIv |
( |
const QByteArray & | pIv | ) |
|
Sets the initialization vector.
- Parameter
-
pIv | the initialization vector |
- Rückgabe
- if initialization vector has wrong size, false is returned. Otherwise true.
Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: