import hashlib


def uuid_hash(uuid):
    """Return SHA1 hash as hex digest of an uuid.

    Requirement from VAC team : You should apply SHA1 hashing over the data as
    a text. More specifically you should have the text data as a UTF8 encoded
    string then convert the string to byte array and digest it into a SHA1
    hash. The resulting SHA1 hash must be converted to text by displaying each
    byte of the hashcode as a HEX char (first byte displayed leftmost in the
    output). The hash must be lowercase.

    No checks are made to determine if the input uuid is valid or not. Dashes
    in the uuid are ignored while computing the hash.

    :param str uuid: uuid to be hashed

    :returns: SHA1 hash as hex digest of the provided uuid.
    """
    uuid_no_dash = uuid.replace('-', '')
    m = hashlib.sha1()
    m.update(bytes(uuid_no_dash, 'utf-8'))
    return m.hexdigest()