store hashes in the database, to optimize space. use util.py