Verify that a B2 object matches a local file (or an expected SHA-1) without
transferring the body.
Three modes, in priority order:
expected-sha1 input set → compare the remote object's SHA-1 to that
literal value. No local read.
destination input is an existing local file → compute that file's
SHA-1 locally and compare to the remote.
Neither → fail.
In all modes, the remote SHA-1 is fetched via a HEAD request (header
x-bz-content-sha1). Large files uploaded via multipart return null from
B2 here because B2 stores the per-part SHA-1s but not a whole-file SHA-1;
the verify will fail with a clear message in that case (you should instead
compare a known-good expected-sha1 from your release manifest).
Verify that a B2 object matches a local file (or an expected SHA-1) without transferring the body.
Three modes, in priority order:
expected-sha1input set → compare the remote object's SHA-1 to that literal value. No local read.destinationinput is an existing local file → compute that file's SHA-1 locally and compare to the remote.In all modes, the remote SHA-1 is fetched via a HEAD request (header
x-bz-content-sha1). Large files uploaded via multipart returnnullfrom B2 here because B2 stores the per-part SHA-1s but not a whole-file SHA-1; the verify will fail with a clear message in that case (you should instead compare a known-goodexpected-sha1from your release manifest).