private boolean getServerDigestPosition ( ) { boolean result = false ; //log.trace("BigEndian bytes: {}", Hex.encodeHexString(s1)); log . trace ( "Trying algorithm: {}" , algorithm ) ; digestPosServer = getDigestOffset ( algorithm , s1 , 0 ) ; log . debug ( "Server digest position offset: {}" , digestPosServer ) ; if ( ! ( result = verifyDigest ( digestPosServer , s1 , GENUINE_FMS_KEY , 36 ) ) ) { // try a different position algorithm ^= 1 ; log . trace ( "Trying algorithm: {}" , algorithm ) ; digestPosServer = getDigestOffset ( algorithm , s1 , 0 ) ; log . debug ( "Server digest position offset: {}" , digestPosServer ) ; if ( ! ( result = verifyDigest ( digestPosServer , s1 , GENUINE_FMS_KEY , 36 ) ) ) { log . warn ( "Server digest verification failed" ) ; // if we dont mind that verification routines failed if ( ! forceVerification ) { return true ; } } else { log . debug ( "Server digest verified" ) ; } } else { log . debug ( "Server digest verified" ) ; } return result ; }
Gets and verifies the server digest .