def hash(mapping, bind, values):
    """ Generate a sha1 for each of the given values. """
    for v in values:
        if v is None:
            continue
        if not isinstance(v, six.string_types):
            v = six.text_type(v)
        yield sha1(v.encode('utf-8')).hexdigest()
Generate a sha1 for each of the given values.