fuchsia_fuzzctl

Function digest_path

Source
pub fn digest_path<P: AsRef<Path>>(
    out_dir: P,
    result: Option<Result_>,
    data: &[u8],
) -> PathBuf
Expand description

Generates the path for a file based on its contents.

Returns a PathBuf for a file in the out_dir that is named by the concatenating the prefix, if provided, with the hex encoded SHA-256 digest of the data. This naming scheme is used both for inputs retrieved from a fuzzer corpus and for artifacts produced by the fuzzer.