mirror of
https://github.com/QuasarApp/Qt-AES.git
synced 2025-04-27 06:04:32 +00:00
Update README.md
This commit is contained in:
parent
093f524e98
commit
dd17d8715b
13
README.md
13
README.md
@ -3,4 +3,15 @@ AES Encryption in Qt.
|
||||
Porting of the Tiny-AES-C
|
||||
|
||||
## Usage
|
||||
To Do
|
||||
Import the header file
|
||||
```#include "qaesencryption.h"
|
||||
|
||||
...
|
||||
|
||||
QAESEncryption encryption(QAESEncryption::AES_128, QAESEncryption::ECB);
|
||||
QByteArray encodedHex = encryption.encode(hexText, keyHex);
|
||||
QByteArray decodedHex = encryption.decode(hexText, keyHex);
|
||||
```
|
||||
|
||||
## Tips
|
||||
In AES the key needs to be 128/192/256 bits long, an MD5 Hash can be used to generate a 128 bit long QByteArray from a QString, a SHA256 can be used to generate a 256bit key.
|
||||
|
Loading…
x
Reference in New Issue
Block a user