C_runtime/blob.hpp
author Dino Kosic <44305363+kraskrom@users.noreply.github.com>
Mon, 02 Dec 2024 11:33:19 +0100
changeset 4056 4b2de1a0fbf9
parent 3940 934bd46a7500
permissions -rw-r--r--
Extend HMI:JsonTable, create Edit CSV POU, create example, add some doc (#41)

* Extend Jsontable widget, create Edit CSV POU, create example for both

* Add doc for HMI:Image and HMI:JsonTable

* Expand example to include HMI:Image
#ifndef BLOB_HPP
#define BLOB_HPP

#include <string>
#include <filesystem>

#include "md5.hpp"

class Blob
{
public:
    Blob(uint8_t *seedData, size_t seedLength);
    ~Blob();
    MD5::digest_t digest();
    uint32_t appendChunk(uint8_t *data, size_t length);
    uint32_t asFile(std::filesystem::path &filename);

private:
    MD5 md5;
    std::FILE * m_file;
    std::filesystem::path m_filename;
};

#endif // BLOB_HPP