import base64


def get_base64_hash_digest_string(hash_object):
  """Takes hashlib object and returns base64-encoded digest as string."""
  return base64.b64encode(hash_object.digest()).decode(encoding='utf-8')