Skip to content
Snippets Groups Projects
Commit aa3828fc authored by Finn's avatar Finn
Browse files

buildgrid/utils.py: New `get_hash_type` function.

Returns the hash type.
parent 057724df
No related branches found
No related tags found
Loading
......@@ -30,6 +30,14 @@ def get_hostname():
return socket.gethostname()
def get_hash_type():
"""Returns the hash type."""
hash_name = HASH().name
if hash_name == "sha256":
return remote_execution_pb2.SHA256
return remote_execution_pb2.UNKNOWN
def create_digest(bytes_to_digest):
"""Computes the :obj:`Digest` of a piece of data.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment