sigil-core · hash
Source declarations, signatures and documentation for hash.
Source: sigil/node/sigil-core/src/hash.rs. SHA-256: 65e418481f6d103c23adcf3665061468a65e84619a00c9e0acdaf173f31648c4.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
hash::SigilHash
A 32-byte BLAKE3 hash used throughout the Sigil blockchain.
#[derive(Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct SigilHash([u8; 32]);Source line: 8.
hash::SigilHash::ZERO
The zero hash (used as parent hash for genesis block).
pub const ZERO: Self;Source line: 12.
hash::SigilHash::from_bytes
Create from raw bytes.
pub fn from_bytes(bytes: [u8; 32]) -> Self;Source line: 15.
hash::SigilHash::digest
Hash arbitrary data.
pub fn digest(data: &[u8]) -> Self;Source line: 20.
hash::SigilHash::digest_many
Hash multiple byte slices (concatenated).
pub fn digest_many(parts: &[&[u8]]) -> Self;Source line: 25.
hash::SigilHash::as_bytes
Returns the raw 32 bytes.
pub fn as_bytes(&self) -> &[u8; 32];Source line: 34.
hash::SigilHash::to_hex
Returns hex-encoded string.
pub fn to_hex(&self) -> String;Source line: 39.
hash::SigilHash::from_hex
Parse from hex string.
pub fn from_hex(hex: &str) -> Result<Self, crate::error::CoreError>;Source line: 48.