diff options
Diffstat (limited to 'IOFileClass/FileManIOFile.hpp')
| -rw-r--r-- | IOFileClass/FileManIOFile.hpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/IOFileClass/FileManIOFile.hpp b/IOFileClass/FileManIOFile.hpp index 4dfcfc4..7013b27 100644 --- a/IOFileClass/FileManIOFile.hpp +++ b/IOFileClass/FileManIOFile.hpp @@ -50,15 +50,35 @@ class FileManIOFile { */ void read(std::string key); + /** - * @brief Read encrypted file. + * @brief Write data in encrypted file. * * @param key : key to encrypt data + * @param data : data to write * - * Save data to "filename" attribute. + * Write the file with or without key + * To write data without key, you need to read it before (to save the key + * in attribute key; * */ void write(std::string key, std::string data); + void write(std::string data); + + + /** + * @brief Write data in encrypted file. + * + * @param data : data to write (for MD5) + * @param dataEncrypted : data to write + * + * Write encryptedData to filename + * + */ + void writeRoutine(std::string data, std::string dataEncrypted); + + + /** * @brief True if file fully decrypted. @@ -87,6 +107,8 @@ class FileManIOFile { bool readable; ///< Readable attribute + byte key[32]; ///< Key in SHA-256 + |
