def get_sha1(contents: bytes) ->str:
    """ Returns an hexdigest (string) """
    from zuper_commons.types import check_isinstance
    import hashlib
    check_isinstance(contents, bytes)
    m = hashlib.sha1()
    m.update(contents)
    s = m.hexdigest()
    check_isinstance(s, str)
    return s
