if ((out.length - len) < outOff) { throw new DataLengthException("output buffer too small"); }
    public int generateBytes(        byte[]  out,        int     outOff,        int     len)        throws DataLengthException, IllegalArgumentException    {        byte[]  hashBuf = new byte[hLen];        byte[]  C = new byte[4];        int     counter = 0;        digest.reset();        if (len > hLen)        {            do            {                ItoOSP(counter, C);                    digest.update(seed, 0, seed.length);                digest.update(C, 0, C.length);                digest.doFinal(hashBuf, 0);                    System.arraycopy(hashBuf, 0, out, outOff + counter * hLen, hLen);            }            while (++counter < (len / hLen));        }        if ((counter * hLen) < len)        {            ItoOSP(counter, C);            digest.update(seed, 0, seed.length);            digest.update(C, 0, C.length);            digest.doFinal(hashBuf, 0);            System.arraycopy(hashBuf, 0, out, outOff + counter * hLen, len - (counter * hLen));        }        return len;    }