pub struct XarReader<R: Read + Seek + Sized + Debug> { /* private fields */ }
Expand description

Read-only interface to a single XAR archive.

Implementations

Construct a new XAR reader from a stream reader.

Obtain the inner reader.

Obtain the parsed XarHeader file header.

The start offset of the heap.

Obtain the table of contents for this archive.

Obtain the decoded content of the table of contents.

Obtain the raw bytes holding the checksum.

Digest the table of contents content with the specified algorithm.

Obtain the file entries in this archive.

Attempt to find the File entry for a given path in the archive.

Write heap file data for a given file record to a writer.

This will write the raw data backing a file as stored in the heap. There’s a good chance the raw data is encoded/compressed.

Returns the number of bytes written.

Write heap file data for a given file ID to a writer.

This is a wrapper around Self::write_file_data_heap_from_file that resolves the File given a file ID.

Write decoded file data for a given file record to a writer.

This will call Self::write_file_data_heap_from_file and will decode that data stream, if the file data is encoded.

Write decoded file data for a given file ID to a writer.

This is a wrapper for Self::write_file_data_decoded_from_file that locates the File entry given a file ID.

Resolve data for a given path.

Unpack the contents of the XAR archive to a given directory.

Obtain the archive checksum.

The checksum consists of a digest format and a raw digest.

Validate the recorded checksum of the table of contents matches actual file state.

Will Err if an error occurs obtaining or computing the checksums. Returns Ok with a bool indicating if the checksums matched.

Obtain RSA signature data from this archive.

The returned tuple contains the raw signature data and the embedded X.509 certificates.

Verifies the RSA signature in the archive.

This verifies that the RSA signature in the archive, if present, is a valid signature for the archive’s checksum data.

The boolean return value indicates if signature validation was performed.

Attempt to resolve a cryptographic message syntax (CMS) signature.

The data signed by the CMS signature is the raw data returned by Self::checksum.

Verifies the cryptographic message syntax (CMS) signature, if present.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more