class
Bakelite::Core::IntegrityVerifier
- Bakelite::Core::IntegrityVerifier
- Reference
- Object
Overview
Tier 1 Core Engine: Streaming SHA-256 content-addressing & CRC32 chunk integrity verifier for Bakelite binary containers (.bkl), appended executables, volumes, and virtual filesystems.
Defined in:
bakelite/core/integrity_verifier.crConstructors
Class Method Summary
-
.compute_manifest_sha256(entries : Array(FileVerificationEntry)) : String
Computes the canonical deterministic SHA-256 manifest digest across a list of FileVerificationEntry items.
-
.normalize_sha256(digest : String) : String
Normalizes a SHA-256 hex digest string (strips optional "sha256:" prefix and downcases).
Instance Method Summary
-
#add_invariant(name : String = "invariant_#{@invariants.size + 1}", &block : VerificationReport -> Bool) : self
Registers a custom verification invariant predicate.
-
#expect_crc32(path : String, crc32 : UInt32) : self
Registers an expected CRC32 checksum for a virtual file path.
-
#expect_digest(path : String, sha256 : String) : self
Registers an expected SHA-256 hex digest for a virtual file path.
-
#expect_manifest(digests : Hash(String, String), strict : Bool = false) : self
Registers a full map of expected file SHA-256 digests.
-
#expect_manifest(manifest : ArchiveManifest, strict : Bool = true) : self
Registers an expected ArchiveManifest instance.
-
#expect_manifest_sha256(digest : String) : self
Registers the expected overall deterministic manifest SHA-256 digest.
-
#expect_sha256(path : String, sha256 : String) : self
Alias for expect_digest.
- #expected_crc32s : Hash(String, UInt32)
- #expected_crc32s=(expected_crc32s : Hash(String, UInt32))
- #expected_digests : Hash(String, String)
- #expected_digests=(expected_digests : Hash(String, String))
- #expected_manifest_sha256 : String | Nil
- #expected_manifest_sha256=(expected_manifest_sha256 : String | Nil)
- #fail_fast : Bool
- #fail_fast=(fail_fast : Bool)
- #invariants : Array(Tuple(String, Proc(VerificationReport, Bool)))
- #invariants=(invariants : Array(Tuple(String, Proc(VerificationReport, Bool))))
- #max_decompressed_bytes : Int64
- #max_decompressed_bytes=(max_decompressed_bytes : Int64)
-
#require_file(path : String) : self
Declares that a virtual file path must exist in the verified archive.
-
#require_files(paths : Enumerable(String)) : self
Declares multiple required virtual file paths.
- #required_files : Set(String)
- #required_files=(required_files : Set(String))
- #strict_manifest : Bool
- #strict_manifest=(strict_manifest : Bool)
-
#verify(target : Path | String | Bytes | IO | Volume | FS::Registry | Array(Volume)) : VerificationReport
Polymorphic verification dispatch for paths, byte buffers, streams, volumes, or registries.
-
#verify!(target : Path | String | Bytes | IO | Volume | FS::Registry | Array(Volume)) : VerificationReport
Executes verification and raises IntegrityError / CorruptContainerError / InvalidTrailerError on failure.
-
#verify_bytes(bytes : Bytes, source_name : String = "<memory>") : VerificationReport
Verifies an in-memory .bkl container byte slice.
- #verify_chunks : Bool
- #verify_chunks=(verify_chunks : Bool)
- #verify_crc32 : Bool
- #verify_crc32=(verify_crc32 : Bool)
-
#verify_file(archive_path : Path | String) : VerificationReport
Verifies a standalone .bkl archive or executable overlay on disk.
-
#verify_io(io : IO, size : Int64 | Nil = nil, source_name : String = "<stream>") : VerificationReport
Verifies a .bkl container from an open IO stream.
-
#verify_registry(registry : FS::Registry, target_name : String = "<registry>") : VerificationReport
Verifies all visible union files across a Bakelite::FS::Registry.
- #verify_sha256 : Bool
- #verify_sha256=(verify_sha256 : Bool)
-
#verify_volume(volume : Volume) : VerificationReport
Verifies a single mounted or in-memory Bakelite::Volume.
-
#verify_volumes(volumes : Array(Volume), target_name : String = "<volumes>", container_sha256 : String | Nil = nil) : VerificationReport
Verifies an array of Bakelite::Volume instances.
- #volume_filter : String | Nil
- #volume_filter=(volume_filter : String | Nil)
Constructor Detail
Class Method Detail
Computes the canonical deterministic SHA-256 manifest digest across a list of FileVerificationEntry items.
Normalizes a SHA-256 hex digest string (strips optional "sha256:" prefix and downcases).
Instance Method Detail
Registers a custom verification invariant predicate.
Registers an expected CRC32 checksum for a virtual file path.
Registers an expected SHA-256 hex digest for a virtual file path.
Registers a full map of expected file SHA-256 digests.
Registers an expected ArchiveManifest instance.
Registers the expected overall deterministic manifest SHA-256 digest.
Declares that a virtual file path must exist in the verified archive.
Declares multiple required virtual file paths.
Polymorphic verification dispatch for paths, byte buffers, streams, volumes, or registries.
Executes verification and raises IntegrityError / CorruptContainerError / InvalidTrailerError on failure.
Verifies an in-memory .bkl container byte slice.
Verifies a standalone .bkl archive or executable overlay on disk.
Verifies a .bkl container from an open IO stream.
Verifies all visible union files across a Bakelite::FS::Registry.
Verifies a single mounted or in-memory Bakelite::Volume.
Verifies an array of Bakelite::Volume instances.