Trait aws_smithy_checksums::Checksum
source · pub trait Checksum: Send + Sync {
// Required methods
fn update(&mut self, bytes: &[u8]);
fn finalize(self: Box<Self>) -> Bytes;
fn size(&self) -> u64;
}
Expand description
Types implementing this trait can calculate checksums.
Checksum algorithms are used to validate the integrity of data. Structs that implement this trait can be used as checksum calculators. This trait requires Send + Sync because these checksums are often used in a threaded context.
Required Methods§
sourcefn update(&mut self, bytes: &[u8])
fn update(&mut self, bytes: &[u8])
Given a slice of bytes, update this checksum’s internal state.