pub fn validate_ecc(data: &[u8]) -> boolExpand description
Checks whether data has been corrupted or tampered with.
Returns true if the data’s checksum is intact and no errors are detected.
§Parameters
data- The encrypted data buffer to validate
§Examples
let data = b"important data";
let encrypted = encrypt(data).expect("encryption failed");
assert!(validate_ecc(&encrypted));