Skip to content

Commit a35070a

Browse files
committed
Remove dirhash example code
Signed-off-by: laurentsimon <laurentsimon@google.com>
1 parent 73fcda3 commit a35070a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

sigstore/hashes.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919
from sigstore_protobuf_specs.dev.sigstore.common.v1 import HashAlgorithm
2020

2121

22-
class DIRSHA256_P1(hashes.HashAlgorithm):
23-
name = "dirsha256-p1"
24-
digest_size = 32
25-
block_size = -1
26-
2722
class Hashed(BaseModel):
2823
"""
2924
Represents hashed value.
@@ -45,6 +40,5 @@ def as_prehashed(self) -> Prehashed:
4540
def hazmat_algorithm(self) -> hashes.HashAlgorithm:
4641
if self.algorithm == HashAlgorithm.SHA2_256:
4742
return hashes.SHA256()
48-
if self.algorithm == HashAlgorithm.HASH_ALGORITHM_UNSPECIFIED:
49-
return DIRSHA256_P1()
43+
# Add more hashes here.
5044
raise ValueError(f"unknown hash algorithm: {self.algorithm}")

0 commit comments

Comments
 (0)