class SuperblockVerifier
Defined at line 32 of file ../../src/devices/block/drivers/block-verity/superblock-verifier.h
`SuperblockVerifier` encapsulates asynchronously loading and verifying that a
superblock hashes to the `expected_superblock_hash` provided to the
constructor, and also verifies that the configuration expressed therein is
supported by this version of the driver.
Example:
SuperblockVerifier verifier(std::move(info), superblock_hash);
if (rc != verifier.StartVerifying(this, OnSuperblockVerificationComplete)) {
return rc;
}
/* OnSuperblockVerificationComplete does something useful with the superblock */
Public Methods
void SuperblockVerifier (DeviceInfo info, const std::array<uint8_t, kHashOutputSize> & expected_superblock_hash)
Defined at line 28 of file ../../src/devices/block/drivers/block-verity/superblock-verifier.cc
zx_status_t StartVerifying (void * cookie, SuperblockVerifierCallback callback)
Load the superblock from the device specified in `info_` and verify its hash
matches `expected_superblock_hash_`. If it does, calls `callback` with
ZX_OK and a borrowed pointer to a superblock struct in `superblock` which
will cease to be valid at the end of the callback. If not, calls `callback`
with a non-ZX_OK status and a null pointer for `superblock`.
Defined at line 34 of file ../../src/devices/block/drivers/block-verity/superblock-verifier.cc
void ~SuperblockVerifier ()
Defined at line 36 of file ../../src/devices/block/drivers/block-verity/superblock-verifier.h
void OnReadCompleted (zx_status_t status, block_op_t * block)
Callback for underlying async block device I/O.
Defined at line 59 of file ../../src/devices/block/drivers/block-verity/superblock-verifier.cc