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

Function measure_cmdline

dstack-mr/src/kernel.rs:234–238  ·  view source on GitHub ↗

Measures the kernel command line by converting to UTF-16LE and hashing.

(cmdline: &str)

Source from the content-addressed store, hash-verified

232
233/// Measures the kernel command line by converting to UTF-16LE and hashing.
234pub(crate) fn measure_cmdline(cmdline: &str) -> Vec<u8> {
235 let mut utf16_cmdline = utf16_encode(cmdline);
236 utf16_cmdline.extend([0, 0]);
237 measure_sha384(&utf16_cmdline)
238}

Callers

nothing calls this directly

Calls 2

utf16_encodeFunction · 0.85
measure_sha384Function · 0.85

Tested by

no test coverage detected