mirror of
https://github.com/QuasarApp/Qt-AES.git
synced 2025-04-26 21:54:32 +00:00
Merge branch 'master' of https://github.com/bricke/Qt-AES
This commit is contained in:
commit
6fc1d88485
@ -65,7 +65,7 @@ Example for 256bit CBC using QString
|
||||
QByteArray encodeText = encryption.encode(inputStr.toLocal8Bit(), hashKey, hashIV);
|
||||
QByteArray decodeText = encryption.decode(encodeText, hashKey, hashIV);
|
||||
|
||||
QString decodedString = QString(QAESEncryption::RemovePadding(decodeText));
|
||||
QString decodedString = QString(encryption.removePadding(decodeText));
|
||||
|
||||
//decodedString == inputStr !!
|
||||
```
|
||||
@ -86,7 +86,11 @@ Static invocation without creating instances, 256 bit key, ECB mode, starting fr
|
||||
QByteArray hashIV = QCryptographicHash::hash(iv.toLocal8Bit(), QCryptographicHash::Md5);
|
||||
|
||||
//Static invocation
|
||||
QAESEncryption::Crypt(QAESEncryption::AES_256, QAESEncryption::CBC, inputStr.toLocal8Bit(), hashKey, hashIV);
|
||||
QByteArray encrypted = QAESEncryption::Crypt(QAESEncryption::AES_256, QAESEncryption::CBC,
|
||||
inputStr.toLocal8Bit(), hashKey, hashIV);
|
||||
//...
|
||||
// Removal of Padding via Static function
|
||||
QString decodedString = QString(QAESEncryption::RemovePadding(decodeText));
|
||||
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user