CollisionDJBX33X implements CollisionInterface { public int hashBack( String s, int target ) { byte[] byteArray = s.getBytes(); int n = byteArray.length; int hash = target; for ( int i = n; i > 0; i-- ) { hash = ( ( hash ^ byteArray[i - 1] ) * 1041204193 ); } return hash; }  @Override int getHash( String s ); int hashBack( String s, int target ); int hashForth( String s ); @Override void genNCollisions( int n, StringBuilder sb, boolean useNamespace ); @Override String getCollisionString( int i, int n ); String getRandomString( int length ); String getIthNCharString( int i, int n ); int generateCollionsMeetInTheMiddle( long numberCollisions );  }
@Test public void MeetInTheMiddleHashBackTest() throws NoSuchAlgorithmException { CollisionDJBX33X instance = new CollisionDJBX33X(); int result1 = instance.hashBack( "vpl", 0 ); int result2 = instance.hashBack( "wQl", 0 ); assertEquals( 998537770, result1 ); assertEquals( 998537770, result2 ); System.out.println( " - Hashback vpl = " + ( instance.hashBack( "vpl", 0 ) ) ); }