scanner with encapsulated visitor, and injected hash function