Utility functions for checksums and serialization. More...
#include <project_tool.h>
Static Public Member Functions | |
| static std::array< uint8_t, 32 > | ComputeRomChecksum (const Rom *rom) |
| Compute SHA-256 checksum of ROM data. | |
| static std::array< uint8_t, 32 > | ComputeSHA256 (const uint8_t *data, size_t length) |
| Compute SHA-256 checksum of arbitrary data. | |
| static std::string | FormatChecksum (const std::array< uint8_t, 32 > &checksum) |
| Format checksum as hex string. | |
| static std::string | FormatTimestamp (const std::chrono::system_clock::time_point &time) |
| Format timestamp for display. | |
| static absl::StatusOr< std::chrono::system_clock::time_point > | ParseTimestamp (const std::string ×tamp) |
| Parse timestamp from string. | |
Utility functions for checksums and serialization.
Definition at line 181 of file project_tool.h.
|
static |
Compute SHA-256 checksum of ROM data.
| rom | ROM instance |
Definition at line 167 of file project_tool.cc.
References yaze::Rom::data(), yaze::Rom::is_loaded(), and yaze::Rom::size().
Referenced by yaze::cli::agent::tools::ProjectStatusTool::Execute(), yaze::cli::agent::tools::ProjectSnapshotTool::Execute(), and yaze::cli::agent::tools::ProjectManager::RestoreSnapshot().

|
static |
Compute SHA-256 checksum of arbitrary data.
| data | Data buffer |
| length | Data length |
Definition at line 179 of file project_tool.cc.
|
static |
Format checksum as hex string.
| checksum | 32-byte checksum |
Definition at line 184 of file project_tool.cc.
Referenced by yaze::cli::agent::tools::ProjectStatusTool::Execute(), yaze::cli::agent::tools::ProjectSnapshotTool::Execute(), and yaze::cli::agent::tools::ProjectToolBase::FormatSnapshot().
|
static |
Format timestamp for display.
| time | Time point |
Definition at line 193 of file project_tool.cc.
Referenced by yaze::cli::agent::tools::ProjectToolBase::FormatSnapshot(), yaze::cli::agent::tools::ProjectManager::Initialize(), yaze::cli::agent::tools::ProjectManager::SaveProjectMetadata(), and yaze::cli::agent::tools::ProjectSnapshot::SaveToFile().
|
static |
Parse timestamp from string.
| timestamp | ISO 8601 timestamp string |
Definition at line 203 of file project_tool.cc.
Referenced by yaze::cli::agent::tools::ProjectSnapshot::LoadFromFile().