From 839c544555a038744d7a7490eed171b3f7bbb651 Mon Sep 17 00:00:00 2001 From: Matteo Brichese Date: Wed, 28 Mar 2018 18:01:14 -0700 Subject: [PATCH] updated readme --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c6191fd..b65e6f8 100644 --- a/README.md +++ b/README.md @@ -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,9 @@ 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); + QString decodedString = QString(QAESEncryption::RemovePadding(decodeText)); ```