self_encryption 0.36.1

Self-encrypting, content-addressed storage - convergent encryption that splits data into obfuscated chunks. The peer-reviewed core of Autonomi.
Documentation
1
2
3
4
5
6
7
8
use xor_name::XorName;

/// Compute a BLAKE3 hash of the given content and return it as a XorName.
/// This replaces the SHA3-256 hashing previously done by `XorName::from_content`.
pub fn content_hash(content: &[u8]) -> XorName {
    let hash = blake3::hash(content);
    XorName(*hash.as_bytes())
}