MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / validate_luks2_headers

Function validate_luks2_headers

dstack-util/src/system_setup.rs:1588–1592  ·  view source on GitHub ↗
(mut reader: impl std::io::Read)

Source from the content-addressed store, hash-verified

1586const PAYLOAD_OFFSET: u64 = 16777216;
1587
1588fn validate_luks2_headers(mut reader: impl std::io::Read) -> Result<()> {
1589 validate_single_luks2_header(&mut reader, 0)?;
1590 validate_single_luks2_header(&mut reader, 1)?;
1591 Ok(())
1592}
1593
1594fn validate_single_luks2_header(mut reader: impl std::io::Read, hdr_ind: u64) -> Result<()> {
1595 let mut hdr_data = vec![0u8; 4096];

Callers 2

open_encrypted_volumeMethod · 0.85

Calls 1

Tested by 1