hash-policy

vb hash-policy [NEW-POLICY]

Description

Query or set the hash policy for the current repository. Available hash policies are as follows:

sha1            New artifact names are created using SHA1

auto            New artifact names are created using SHA1, but
                automatically change the policy to "blake3" when
                any SHA3/BLAKE3 artifact enters the repository
                (or to "sha3" if BLAKE3 support is not enabled).

sha3            New artifact names are created using SHA3, but
                older artifacts with SHA1 names may be reused.

sha3-only       Use only SHA3 artifact names.  Do not reuse legacy
                SHA1 names.

shun-sha1       Shun any SHA1 artifacts received by sync operations
                other than clones.  Older legacy SHA1 artifacts are
                allowed during a clone.

blake3          New artifact names are created using BLAKE3, but
                older artifacts with SHA1 names may be reused.

blake3-only     Use only BLAKE3 artifact names.  Do not reuse legacy
                SHA1 names.

The default hash policy for repositories without a stored hash-policy is blake3-only when BLAKE3 support is enabled, otherwise sha3-only.

Examples

  • Show current hash policy

$ vb hash-policy
sha3-only
  • Switch to a stricter policy for new artifacts

$ vb hash-policy sha3-only
sha3-only
  • Switch to SHA3

$ vb hash-policy sha3
sha3