Python port of Peter Baehr's javascript passwords project.