aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2022-07-17 18:40:13 -0400
committerCameron Katri <me@cameronkatri.com>2022-07-17 18:40:13 -0400
commitd0f2a8d014cab94df4577ef2de1b34d2b91660a2 (patch)
tree542081c7244ac403d059778a8ffe938525112d9e
parent847abe6294f03d0bc47e1509defb34822c24ba74 (diff)
downloadldid-d0f2a8d014cab94df4577ef2de1b34d2b91660a2.tar.gz
ldid-d0f2a8d014cab94df4577ef2de1b34d2b91660a2.tar.zst
ldid-d0f2a8d014cab94df4577ef2de1b34d2b91660a2.zip
Add CandidateCDHashFull to -h
-rw-r--r--ldid.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldid.cpp b/ldid.cpp
index 1f20275..0bca612 100644
--- a/ldid.cpp
+++ b/ldid.cpp
@@ -3577,7 +3577,7 @@ int main(int argc, char *argv[]) {
auto &algorithm(*algorithms[type - 1]);
uint8_t hash[algorithm.size_];
algorithm(hash, blob + begin, end - begin);
- candidates.insert({type, {directory, end - begin, algorithm, Hex(hash, 20), begin}});
+ candidates.insert({type, {directory, end - begin, algorithm, Hex(hash, algorithm.size_), begin}});
} else if (type == CSSLOT_SIGNATURESLOT) {
cmsBegin = Swap(super->index[index].offset);
cmsEnd = index + 1 == Swap(super->count) ? Swap(super->blob.length) : Swap(super->index[index + 1].offset);
@@ -3622,7 +3622,8 @@ int main(int argc, char *argv[]) {
auto choice(candidate.second.algorithm_.name());
choices += ',';
choices += choice;
- printf("CandidateCDHash %s=%s\n", choice, candidate.second.hash_.c_str());
+ printf("CandidateCDHash %s=%.40s\n", choice, candidate.second.hash_.c_str());
+ printf("CandidateCDHashFull %s=%s\n", choice, candidate.second.hash_.c_str());
}
printf("Hash choices=%s\n", choices.c_str() + 1);