if ((flags & NEGOTIATE_TARGET_INFO) != 0) { int tgtInfoSecurityBufferOffset = containsContext ? 40: 32;  byte[] targetInfoLengthBytes = new byte[2]; for (int i = 0; i < 2; i++) { targetInfoLengthBytes[i] = resultBuffer[tgtInfoSecurityBufferOffset + i]; } int targetInfoLength = toInt(targetInfoLengthBytes);  byte[] targetInfoAllocatedBytes = new byte[2]; for (int i = 0; i < 2; i++) { targetInfoAllocatedBytes[i] = resultBuffer[tgtInfoSecurityBufferOffset + 2 + i]; } int targetInfoAllocated = toInt(targetInfoAllocatedBytes);  byte[] targetInfoOffsetBytes = new byte[4]; for (int i = 0; i < 4; i++) { targetInfoOffsetBytes[i] = resultBuffer[tgtInfoSecurityBufferOffset + 4 + i]; } long targetInfoOffset = toLong(targetInfoOffsetBytes);  byte[] targetInfoTypeBytes = new byte[2]; byte[] subblockLengthBytes = new byte[2]; int read = 0; while (targetInfoLength > 0 && read <= targetInfoAllocated) { for (int i = 0; i < 2; i++) { targetInfoTypeBytes[i] = resultBuffer[(int)targetInfoOffset + i]; } read += 2; targetInfoOffset += 2; int targetInfoType = toInt(targetInfoTypeBytes); if (targetInfoType == 0){ break; }  for (int i = 0; i < 2; i++) { subblockLengthBytes[i] = resultBuffer[(int)targetInfoOffset + i]; } read += 2; targetInfoOffset += 2; int subblockLength = toInt(subblockLengthBytes);  String typeDescription = (String)ourTargetInfoTypes.get(new Integer(targetInfoType)); if (typeDescription != null) { String info = new String(resultBuffer, (int)targetInfoOffset, subblockLength); log.append(typeDescription + ": " + info); log.append('\n'); } read += subblockLength; targetInfoOffset += subblockLength; } } log.append('\n'); SVNDebugLog.logInfo(log.toString());
    public void parseChallenge(String challenge){        byte[] challengeBase64Bytes = HTTPAuthentication.getBytes(challenge, DEFAULT_CHARSET);        byte[] resultBuffer = new byte[challengeBase64Bytes.length];        int resultLength = SVNBase64.base64ToByteArray(new StringBuffer(new String(challengeBase64Bytes)), resultBuffer);        myNonce = new byte[8];        for (int i = 0; i < 8; i++) {            myNonce[i] = resultBuffer[i + 24];        }        byte[] flagBytes = new byte[4];        for (int i = 0; i < 4; i++) {            flagBytes[i] = resultBuffer[i + 20];        }        long flags = fromLong(flagBytes);        //check for local call        if ((flags & 0x00004000) != 0 && resultLength >= 40) {            byte[] contextHBytes = new byte[4];            for (int i = 0; i < 4; i++) {                contextHBytes[i] = resultBuffer[i + 32];            }            long contextH = fromLong(contextHBytes);            if (contextH != 0) {                myIsNegotiateLocalCall = true;            } else {                myIsNegotiateLocalCall = false;            }        } else {            myIsNegotiateLocalCall = false;        }            }