Polyphase Game Engine
Loading...
Searching...
No Matches
Sha256.h
Go to the documentation of this file.
1
#pragma once
2
3
// Sha256
4
//
5
// Minimal SHA-256 helper used by the engine-runtime manifest and the
6
// runtime validator. Implementation is a self-contained translation of
7
// the FIPS-180-4 specification (no third-party code imported), so it is
8
// license-clean for inclusion in shipping engine builds.
9
//
10
// Output convention: lowercase hex, 64 characters, no separators.
11
12
#include <cstddef>
13
#include <cstdint>
14
#include <string>
15
16
#include "
PolyphaseAPI.h
"
17
18
struct
POLYPHASE_API
Sha256
19
{
20
// Hash an arbitrary contiguous buffer.
21
static
std::string HashHex(
const
void
* data,
size_t
size);
22
23
// Stream-hash a file from disk in fixed-size chunks (does not load
24
// the whole file into memory). On failure, returns false and fills
25
// outError with a diagnostic. On success, outHex receives the
26
// 64-character lowercase hex digest.
27
static
bool
HashFileHex(
const
std::string& path,
28
std::string& outHex,
29
std::string& outError);
30
};
PolyphaseAPI.h
Export macros for Polyphase Engine symbols.
POLYPHASE_API
#define POLYPHASE_API
Definition
PolyphaseAPI.h:31
Sha256
Definition
Sha256.h:19
Engine
Source
Engine
Utils
Sha256.h
Generated by
1.9.8