Skip to main content

Module hash

Module hash 

Source
Expand description

Cryptographic hash functions via Solana syscalls.

No existing Solana framework wraps sol_sha256 or sol_keccak256 with ergonomic APIs at the raw substrate level. Programs that need hashing either pull in heavy crates or write unsafe syscall glue every time.

Hopper wraps these syscalls with safe, zero-alloc APIs.

Functions§

keccak256
Compute Keccak-256 over one or more byte slices.
keccak256_single
Compute Keccak-256 over a single byte slice.
sha256
Compute SHA-256 over one or more byte slices.
sha256_single
Compute SHA-256 over a single byte slice.

Type Aliases§

Keccak256Hash
Keccak-256 hash output: 32 bytes.
Sha256Hash
SHA-256 hash output: 32 bytes.