pub fn verify_chunk(name: &XorName, bytes: &[u8]) -> Result<EncryptedChunk>Expand description
Verifies and deserializes a chunk by checking its content hash matches the provided name.
§Arguments
name- The expected XorName hash of the chunk contentbytes- The serialized chunk content to verify
§Returns
Result<EncryptedChunk>- The deserialized chunk if verification succeedsError- If the content hash doesn’t match or deserialization fails