OpenAgentID documentation
Source referencesRust module referenceoas-crypto

oas-crypto · hashing

Declared module signatures, types, configuration, and source documentation.

Source: oas/oas/oas-crypto/src/hashing.rs. SHA-256: 7043e0367e09a7c6b8bf52cfa75671909b2d72f083d906fb04fb6ae538b0e6d4.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

hashing::blake3_hash

BLAKE3 content hashing for OAS documents and data.

Provides content-addressable hashing used for document integrity checks and content addressing in registries. Computes the BLAKE3 hash of the given data.

Returns the 32-byte hash as a fixed-size array.

Arguments

  • data - The bytes to hash.

Returns

A 32-byte BLAKE3 hash.

Examples

use oas_crypto::hashing::blake3_hash;

let hash = blake3_hash(b"hello world");
assert_eq!(hash.len(), 32);
pub fn blake3_hash(data: &[u8]) -> [u8; 32];

Source line: 27.

hashing::blake3_hash_hex

Computes the BLAKE3 hash and returns it as a hex string.

Arguments

  • data - The bytes to hash.

Returns

A 64-character lowercase hex string of the BLAKE3 hash.

Examples

use oas_crypto::hashing::blake3_hash_hex;

let hex = blake3_hash_hex(b"hello world");
assert_eq!(hex.len(), 64);
pub fn blake3_hash_hex(data: &[u8]) -> String;

Source line: 49.

On this page