Create SHA-1 hash, get digest, b64 encode, split every 60 char.

def digester(data):
    """Create SHA-1 hash, get digest, b64 encode, split every 60 char."""
    if not isinstance(data, six.binary_type):
        data = data.encode('utf_8')
    hashof = hashlib.sha1(data).digest()
    encoded_hash = base64.b64encode(hashof)
    if not isinstance(encoded_hash, six.string_types):
        encoded_hash = encoded_hash.decode('utf_8')
    chunked = splitter(encoded_hash, chunksize=60)
    lines = '\n'.join(chunked)
    return lines