embdgen.plugins.content.VerityContent
- class embdgen.plugins.content.VerityContent.VerityContent[source]
Bases:
BinaryContent
dm-verity hashed content
Calculates the hashes for the content and writes them directly after the content (block aligned).
Additionally a metadata file is generated, that contains the all values required, to open the verity device. This file can be parsed by CominitContent (from embdgen-cominit), to generate cominit metadata.
- CONTENT_TYPE = 'verity'
- content: BinaryContent
The payload content of the partition
- metadata: Path
A path to a file, where the metadata is written to.
This is in the same format as the output of veritysetup.
- salt: str | None = None
Salt to use for verity hashes. This can be useful, to generate reproducible images
- algorithm: str = 'sha256'
Hash algorithm to use (defaults to sha256)
- use_internal_implementation: bool = True
If set to false, veritysetup is used, otherwise a pure python solution is used, to generate the hash tree.
- property hash_file