@Test public void md5AnonymizerTest() { Anonymizer anonymous = new Anonymizer("md5"); String hashCode = anonymous.generateHash("127.0.0.1", "fake user agent string"); assertEquals(hashCode, "9c4dd865c49228784fa75b274246dab6"); }
public final String generateHash(final String ipAddress, final String userAgent) { HashCode hc = this.hasher. putString(ipAddress). putString(userAgent). hash(); return hc.toString(); }
Anonymizer { public final String generateHash(final String ipAddress, final String userAgent) { HashCode hc = this.hasher. putString(ipAddress). putString(userAgent). hash(); return hc.toString(); } }
Anonymizer { public final String generateHash(final String ipAddress, final String userAgent) { HashCode hc = this.hasher. putString(ipAddress). putString(userAgent). hash(); return hc.toString(); } Anonymizer(final String hashFunction); }
Anonymizer { public final String generateHash(final String ipAddress, final String userAgent) { HashCode hc = this.hasher. putString(ipAddress). putString(userAgent). hash(); return hc.toString(); } Anonymizer(final String hashFunction); final String generateHash(final String ipAddress, final String userAgent); }
Anonymizer { public final String generateHash(final String ipAddress, final String userAgent) { HashCode hc = this.hasher. putString(ipAddress). putString(userAgent). hash(); return hc.toString(); } Anonymizer(final String hashFunction); final String generateHash(final String ipAddress, final String userAgent);  }