pub fn write_integrity_only<P: AsRef<Path>, C: AsRef<[u8]>>(
    path: P,
    contents: C
) -> Result<()>