long flags = fromLong(flagBytes);
long flags = toLong(flagBytes);  StringBuffer log = new StringBuffer(); String base64DecodedMessage = new String(resultBuffer, 0, resultLength); log.append("NTLM auth message: " + base64DecodedMessage); log.append('\n'); log.append("Length: " + base64DecodedMessage.length()); log.append('\n'); log.append("Signature: " + proto); log.append('\n'); log.append("Type: " + type); log.append('\n'); log.append("Flags: " + Long.toString(flags, 16)); log.append('\n'); for (Iterator flagsIter = ourFlags.keySet().iterator(); flagsIter.hasNext();) { Long curFlag = (Long)flagsIter.next(); if ((flags & curFlag.longValue()) != 0) { log.append(ourFlags.get(curFlag)); log.append('\n'); } }  byte[] targetNameLengthBytes = new byte[2]; for (int i = 0; i < 2; i++) { targetNameLengthBytes[i] = resultBuffer[12 + i]; } int targetNameLength = toInt(targetNameLengthBytes);  byte[] targetNameAllocatedBytes = new byte[2]; for (int i = 0; i < 2; i++) { targetNameAllocatedBytes[i] = resultBuffer[14 + i]; } int targetNameAllocated = toInt(targetNameAllocatedBytes);  byte[] targetNameOffsetBytes = new byte[4]; for (int i = 0; i < 4; i++) { targetNameOffsetBytes[i] = resultBuffer[16 + i]; } long targetNameOffset = toLong(targetNameOffsetBytes);  if (targetNameLength > 0) { String targetName = new String(resultBuffer, (int)targetNameOffset, targetNameAllocated); log.append("Target Name: " + targetName); log.append('\n'); } log.append("Challenge: "); for (int i = 0; i < myNonce.length; i++) { log.append(SVNFormatUtil.getHexNumberFromByte(myNonce[i])); } log.append('\n');
    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;        }            }