public int doFinal(byte[] out,int outOff){
  byte paddingByte=(byte)(M.length - mOff);
  for (int i=mOff; i < M.length; i++) {
    M[i]=paddingByte;
  }
  processCheckSum(M);
  processBlock(M);
  processBlock(C);
  System.arraycopy(X,xOff,out,outOff,16);
  reset();
  return DIGEST_LENGTH;
}

public int doFinal ( byte [ ] out , int outOff ) { byte paddingByte = ( byte ) ( M . length - mOff ) ; for ( int i = mOff ; i < M . length ; i ++ ) { M [ i ] = paddingByte ; } processCheckSum ( M ) ; 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 .
