#include "hash.hpp"
#include "dshash.hpp"
#include <filesystem>

std::string hash_data(const std::string& data) {
    // Create a DSHash object from string data
    DSHash hasher(data);
    return hasher.toString();
}

std::string hash_file(const std::string& path) {
    // Check if file exists
    if (!std::filesystem::exists(path)) {
        return "";
    }
    
    // Create a DSHash object from file path
    std::filesystem::path filepath(path);
    DSHash hasher(filepath);
    return hasher.toString();
} 