/** * Return the hash. Note that this can only be called once. Subsequent calls reset the hash. * MessageDigest doc says: Completes the hash computation by performing final operations such as * padding. */ public String computeHash() { System.out.println( "XXXXXXXXXXXXXX calcHash=" + calcHash + "TestRequestParameters.getCalcHash()=" + TestRequestParameters.getCalcHash()); if (calcHash && TestRequestParameters.getCalcHash()) _hash = HCUtil.convertHashBytesToString(_md.digest()); else _hash = "hash disabled"; return _hash; }
// // Functions // protected HCTestByteChannel(boolean calcHash) throws NoSuchAlgorithmException { this.calcHash = calcHash; _bytes = new byte[_bufsize]; if (calcHash && TestRequestParameters.getCalcHash()) _md = MessageDigest.getInstance(HoneycombTestConstants.CURRENT_HASH_ALG); }