question: public static int hash ( String key , int bitSize , String input , String hashType ) { int bitLimitedHash ; try { MessageDigest md = MessageDigest . getInstance ( hashType ) ; byte [ ] array = md . digest ( input . getBytes ( ) ) ; int hashInt = fromByteArray ( array ) ; bitLimitedHash = hashInt ; if ( bitSize < 32 ) { bitLimitedHash = ( 0xFFFFFFFF > > > ( 32 - bitSize ) ) & hashInt ; } logger . debug ( "hashInt = " + hashInt + " bitLimitedHash = " + bitLimitedHash ) ; } catch ( NoSuchAlgorithmException e ) { logger . info ( e . toString ( ) ) ; bitLimitedHash = hash ( key , bitSize , input ) ; } return bitLimitedHash ; }
target:  Hash method to optionally specify a hash type other than the default java hashCode() hashType must be MD5, SHA-1, or SHA-256