merge: third-pass archive, image and analysis fixes (W-1, W-5, W-7, W-13, W-14)
Merge branch fix3/data-images into the verification branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
23 files changed
+1132
-169
No files matched your search
@@ -223,6 +223,15 @@ public static class ThumbPack
|
||||
sha256 is { Length: HashLength * 2 }
|
||||
? Convert.FromHexString(sha256)
|
||||
: System.Security.Cryptography.SHA256.HashData(System.Text.Encoding.UTF8.GetBytes($"{file}|{size}"));
|
||||
|
||||
/// <summary>
|
||||
/// Whether a thumbnail with <paramref name="sourceHash"/> was drawn from this original: its <see cref="Fingerprint"/>,
|
||||
/// or, for an original hashed since (a verify hashes the photos a scan adopted), the fingerprint of its file name and
|
||||
/// size it was drawn with before. The hash changes nothing about the photo.
|
||||
/// </summary>
|
||||
public static bool IsFrom(ReadOnlySpan<byte> sourceHash, string? sha256, string file, long size) =>
|
||||
sourceHash.SequenceEqual(Fingerprint(sha256, file, size))
|
||||
|| (sha256 is { Length: HashLength * 2 } && sourceHash.SequenceEqual(Fingerprint(null, file, size)));
|
||||
}
|
||||
|
||||
/// <summary>Random access to the thumbnails of a pack without loading the file; safe while a writer appends.</summary>
|
||||
|
||||
Reference in new issue
Block a user