public static String hashToString ( byte [ ] hash ) { StringBuilder buf = new StringBuilder ( ) ; for ( byte b : hash ) { buf . append ( HEX_CHARS [ ( b >> 4 ) & 0xF ] ) ; buf . append ( HEX_CHARS [ b & 0xF ] ) ; } return buf . toString ( ) ; }
Convert a hash to a string of hex digits .