/** * update the message digest with a single byte. * * @param in the input byte to be entered. */ public void update(byte in) { M[mOff++] = in; if (mOff == 16) { processCheckSum(M); processBlock(M); mOff = 0; } }
/** * update the message digest with a single byte. * * @param in the input byte to be entered. */ public void update(byte in) { M[mOff++] = in; if (mOff == 16) { processCheckSum(M); processBlock(M); mOff = 0; } }
/** * close the digest, producing the final digest value. The doFinal * call leaves the digest reset. * * @param out the array the digest is to be copied into. * @param outOff the offset into the out array the digest is to start at. */ public int doFinal(byte[] out, int outOff) { // add padding byte paddingByte = (byte)(M.length-mOff); for (int i=mOff;i<M.length;i++) { M[i] = paddingByte; } //do final check sum processCheckSum(M); // do final block process processBlock(M); processBlock(C); System.arraycopy(X,xOff,out,outOff,16); reset(); return DIGEST_LENGTH; } /**
/** * close the digest, producing the final digest value. The doFinal * call leaves the digest reset. * * @param out the array the digest is to be copied into. * @param outOff the offset into the out array the digest is to start at. */ public int doFinal(byte[] out, int outOff) { // add padding byte paddingByte = (byte)(M.length-mOff); for (int i=mOff;i<M.length;i++) { M[i] = paddingByte; } //do final check sum processCheckSum(M); // do final block process processBlock(M); processBlock(C); System.arraycopy(X,xOff,out,outOff,16); reset(); return DIGEST_LENGTH; } /**
processBlock(M); len -= 16; inOff += 16;
processBlock(M); len -= 16; inOff += 16;