mirror of
https://github.com/QuasarApp/Qt-AES.git
synced 2025-04-27 14:14:31 +00:00
updated readme
This commit is contained in:
parent
80574a11a9
commit
839c544555
@ -65,7 +65,7 @@ Example for 256bit CBC using QString
|
|||||||
QByteArray encodeText = encryption.encode(inputStr.toLocal8Bit(), hashKey, hashIV);
|
QByteArray encodeText = encryption.encode(inputStr.toLocal8Bit(), hashKey, hashIV);
|
||||||
QByteArray decodeText = encryption.decode(encodeText, hashKey, hashIV);
|
QByteArray decodeText = encryption.decode(encodeText, hashKey, hashIV);
|
||||||
|
|
||||||
QString decodedString = QString(QAESEncryption::RemovePadding(decodeText));
|
QString decodedString = QString(encryption.removePadding(decodeText));
|
||||||
|
|
||||||
//decodedString == inputStr !!
|
//decodedString == inputStr !!
|
||||||
```
|
```
|
||||||
@ -86,7 +86,9 @@ Static invocation without creating instances, 256 bit key, ECB mode, starting fr
|
|||||||
QByteArray hashIV = QCryptographicHash::hash(iv.toLocal8Bit(), QCryptographicHash::Md5);
|
QByteArray hashIV = QCryptographicHash::hash(iv.toLocal8Bit(), QCryptographicHash::Md5);
|
||||||
|
|
||||||
//Static invocation
|
//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);
|
||||||
|
QString decodedString = QString(QAESEncryption::RemovePadding(decodeText));
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user