diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-31 12:50:31 -0700 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2020-09-09 17:53:10 -0700 |
commit | 1b879d8276c39dca6a43b656df9224e21b8b80e1 (patch) | |
tree | 0a98e0ea962fbb42598f6b6b3554755fb28b300e /pkg/merkletree | |
parent | 661c6bbb180129f2a81484005571233df6da16d2 (diff) |
Implement walk in gvisor verity fs
Implement walk directories in gvisor verity file system. For each step,
the child dentry is verified against a verified parent root hash.
PiperOrigin-RevId: 329358747
Diffstat (limited to 'pkg/merkletree')
-rw-r--r-- | pkg/merkletree/merkletree.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/merkletree/merkletree.go b/pkg/merkletree/merkletree.go index 1a0477c6a..36832ec86 100644 --- a/pkg/merkletree/merkletree.go +++ b/pkg/merkletree/merkletree.go @@ -29,6 +29,12 @@ const ( sha256DigestSize = 32 ) +// DigestSize returns the size (in bytes) of a digest. +// TODO(b/156980949): Allow config other hash methods (SHA384/SHA512). +func DigestSize() int { + return sha256DigestSize +} + // Layout defines the scale of a Merkle tree. type Layout struct { // blockSize is the size of a data block to be hashed. |