public static boolean checkClientId ( boolean isLegacyAttributeList , String farEndClientID ) { if ( ZRTP . CLIENT_ID_LEGACY . equals ( farEndClientID ) ) return true ; if ( ZRTP . CLIENT_ID_RFC . equals ( farEndClientID ) ) return false ; boolean isPrintable = true ; for ( int i = 0 ; i < farEndClientID . length ( ) ; i ++ ) { int singleChar = farEndClientID . charAt ( i ) ; if ( singleChar < 32 || singleChar >= 127 ) { isPrintable = false ; } } return ! isPrintable && isLegacyAttributeList ; }
Legacy Client send ZRTP . CLIENT_ID_LEGACY or a non - printable ClientId