Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
MissingHashes Class Reference
Inheritance diagram for MissingHashes:
Collaboration diagram for MissingHashes:

Public Member Functions

None __init__ (self)
 
- Public Member Functions inherited from Hashes
"Hashes" __and__ (self, "Hashes" other)
 
int digest_count (self)
 
bool is_hash_allowed (self, str hash_name, str hex_digest)
 
None check_against_chunks (self, Iterable[bytes] chunks)
 
None check_against_file (self, BinaryIO file)
 
None check_against_path (self, str path)
 
bool has_one_of (self, Dict[str, str] hashes)
 
bool __bool__ (self)
 
bool __eq__ (self, object other)
 
int __hash__ (self)
 

Protected Member Functions

"NoReturn" _raise (self, Dict[str, "_Hash"] gots)
 

Additional Inherited Members

- Protected Attributes inherited from Hashes
 _allowed
 

Detailed Description

A workalike for Hashes used when we're missing a hash for a requirement

It computes the actual hash of the requirement and raises a HashMissing
exception showing it to the user.

Definition at line 136 of file hashes.py.

Constructor & Destructor Documentation

◆ __init__()

None __init__ (   self)
Don't offer the ``hashes`` kwarg.

Reimplemented from Hashes.

Definition at line 144 of file hashes.py.

144 def __init__(self) -> None:
145 """Don't offer the ``hashes`` kwarg."""
146 # Pass our favorite hash in to generate a "gotten hash". With the
147 # empty list, it will never match, so an error will always raise.
148 super().__init__(hashes={FAVORITE_HASH: []})
149
for i

References MissingHashes.__init__(), and i.

Referenced by MissingHashes.__init__(), and Protocol.__init_subclass__().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ _raise()

"NoReturn" _raise (   self,
Dict[str, "_Hash"]  gots 
)
protected

Reimplemented from Hashes.

Definition at line 150 of file hashes.py.

150 def _raise(self, gots: Dict[str, "_Hash"]) -> "NoReturn":
151 raise HashMissing(gots[FAVORITE_HASH].hexdigest())

References i.

Referenced by Hashes.check_against_chunks().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: