self_encryption 0.35.0

Self encrypting files (convergent encryption plus obfuscation)
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())
}