libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
checksum.c File Reference
`#include <inttypes.h>`
`#include <stdint.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include "aaruformat/context.h"`
`#include "aaruformat/enums.h"`
`#include "aaruformat/structs/checksum.h"`
`#include "aaruformat/structs/index.h"`
`#include "log.h"`

Go to the source code of this file.

## Functions
void | process_checksum_block (aaruformat_context *ctx, const IndexEntry *entry)
| Processes a checksum block from the image stream.

## Function Documentation

## ◆ process_checksum_block()

void process_checksum_block | ( | aaruformat_context * | ctx,
|  | const IndexEntry * | entry )

Processes a checksum block from the image stream.

Reads a checksum block, parses its entries, and stores the checksums (MD5, SHA1, SHA256, SpamSum) in the context.

Parameters

  ctx | Pointer to the aaruformat context.
  entry | Pointer to the index entry describing the checksum block.

Definition at line 39 of file checksum.c.

References ChecksumBlock, aaruformat_context::checksums, ChecksumHeader::entries, FATAL, Checksums::hasMd5, Checksums::hasSha1, Checksums::hasSha256, Checksums::hasSpamSum, ChecksumHeader::identifier, aaruformat_context::imageStream, ChecksumEntry::length, ChecksumHeader::length, Md5, Checksums::md5, MD5_DIGEST_LENGTH, IndexEntry::offset, Sha1, Checksums::sha1, SHA1_DIGEST_LENGTH, Sha256, Checksums::sha256, SHA256_DIGEST_LENGTH, SpamSum, Checksums::spamsum, TRACE, and ChecksumEntry::type.

Referenced by aaruf_open().