question: private static String byteToHex ( byte [ ] digest ) { StringBuilder builder = new StringBuilder ( ) ; for ( byte b : digest ) { String hex = Integer . toHexString ( 0xff & b ) ; if ( hex . length ( ) == 1 ) { builder . append ( '0' ) ; } builder . append ( hex ) ; } return builder . toString ( ) ; }
target:  Transform binary to hex