Skip to main content

parse_credential_file

Function parse_credential_file 

Source
pub fn parse_credential_file(data: &[u8]) -> Result<Vec<u8>, DpapiError>
Expand description

Strip the on-disk CredentialFile wrapper, returning the inner DPAPI blob.

Reads Version(4), Size(4), Unknown(4), then returns exactly Size bytes of Data. A truncated file (Size larger than the remaining bytes) is rejected with DpapiError::TooShort rather than over-reading.