Performance, security and provenance hardening (ann/io/migrate/agent) + two audit fixes #2
@@ -426,22 +426,6 @@ impl<'f> Dataset<'f> {
|
|||||||
Ok(data_read::read_as_strings(&raw, &dt)?)
|
Ok(data_read::read_as_strings(&raw, &dt)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Verify this dataset's SHINES provenance hash (the `_provenance_sha256`
|
|
||||||
/// attribute written by [`clawhdf5_format::type_builders::DatasetBuilder::with_provenance`])
|
|
||||||
/// against its actual stored bytes.
|
|
||||||
///
|
|
||||||
/// Returns [`clawhdf5_format::provenance::VerifyResult::NoHash`] if the
|
|
||||||
/// dataset was never written with provenance metadata. Requires the
|
|
||||||
/// `provenance` Cargo feature on `clawhdf5-format` (enabled by default).
|
|
||||||
#[cfg(feature = "provenance")]
|
|
||||||
pub fn verify_provenance(&self) -> Result<clawhdf5_format::provenance::VerifyResult, Error> {
|
|
||||||
Ok(clawhdf5_format::provenance::verify_dataset(
|
|
||||||
self.file.data.as_bytes(),
|
|
||||||
&self.header,
|
|
||||||
self.file.offset_size(),
|
|
||||||
self.file.length_size(),
|
|
||||||
)?)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ----- Selection-based read methods -----
|
// ----- Selection-based read methods -----
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user