diff options
Diffstat (limited to 'src/core/function/FileOperator.h')
-rw-r--r-- | src/core/function/FileOperator.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/core/function/FileOperator.h b/src/core/function/FileOperator.h index de195a96..aa2c3b73 100644 --- a/src/core/function/FileOperator.h +++ b/src/core/function/FileOperator.h @@ -38,7 +38,7 @@ namespace GpgFrontend { * */ class FileOperator { -public: + public: /** * @brief read file content using std struct * @@ -79,7 +79,14 @@ public: * @return false if failed */ static bool WriteFile(const QString &file_name, const QByteArray &data); + + /** + * calculate the hash of a file + * @param file_path + * @return + */ + static std::string CalculateHash(const std::filesystem::path &file_path); }; -} // namespace GpgFrontend +} // namespace GpgFrontend -#endif // GPGFRONTEND_FILEOPERATOR_H +#endif // GPGFRONTEND_FILEOPERATOR_H |