New API call iso_util_decode_md5_tag(). Augmented checksum tag by self-MD5.

This commit is contained in:
2009-08-14 16:32:10 +02:00
parent ba66a7896a
commit 9467f2e644
6 changed files with 158 additions and 13 deletions

View File

@@ -593,6 +593,17 @@ int checksum_writer_write_data(IsoImageWriter *writer)
for (i = 0; i < 16; i++)
sprintf(tag_block + l + 2 * i, "%2.2x",
((unsigned char *) md5)[i]);
res = iso_md5_start(&ctx);
if (res > 0) {
iso_md5_compute(ctx, tag_block, l + 32);
iso_md5_end(&ctx, md5);
strcpy(tag_block + l + 32, " self=");
l += 32 + 6;
for (i = 0; i < 16; i++)
sprintf(tag_block + l + 2 * i, "%2.2x",
((unsigned char *) md5)[i]);
}
tag_block[l + 32] = '\n';
}
wres = iso_write(t, tag_block, 2048);