pub struct ChecksumVerifier;Expand description
Checksum verification for file integrity
Implementations§
Source§impl ChecksumVerifier
impl ChecksumVerifier
Sourcepub async fn CalculateSha256(&self, file_path: &Path) -> Result<String>
pub async fn CalculateSha256(&self, file_path: &Path) -> Result<String>
Calculate SHA-256 checksum of a file
Sourcepub async fn VerifySha256(
&self,
file_path: &Path,
expected_checksum: &str,
) -> Result<bool>
pub async fn VerifySha256( &self, file_path: &Path, expected_checksum: &str, ) -> Result<bool>
Verify file checksum with constant-time comparison
Sourcepub fn CalculateSha256Bytes(&self, data: &[u8]) -> String
pub fn CalculateSha256Bytes(&self, data: &[u8]) -> String
Calculate checksum from bytes
Sourcepub async fn CalculateMd5(&self, file_path: &Path) -> Result<String>
pub async fn CalculateMd5(&self, file_path: &Path) -> Result<String>
Calculate MD5 checksum (legacy support)
Sourcepub fn ConstantTimeCompare(&self, a: &str, b: &str) -> bool
pub fn ConstantTimeCompare(&self, a: &str, b: &str) -> bool
Constant-time compare two checksum strings
Auto Trait Implementations§
impl Freeze for ChecksumVerifier
impl RefUnwindSafe for ChecksumVerifier
impl Send for ChecksumVerifier
impl Sync for ChecksumVerifier
impl Unpin for ChecksumVerifier
impl UnwindSafe for ChecksumVerifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].