Function read_fpcalc

Source
pub fn read_fpcalc(stdout: &str) -> Result<Fingerprint, String>
Expand description

Reads fpcalc’s two lines: DURATION= and FINGERPRINT=.

The duration it states is preferred over the caller’s, because it is the length of what was decoded rather than the length a header claims. Decimal fractions are truncated to whole seconds; malformed fractions, signs and values outside u32 are refused instead of accepting a prefix.