public void update(byte in) throws IllegalStateException { if (bufOff == buf.length) { byte[] sumbuf = new byte[buf.length]; System.arraycopy(buf, 0, sumbuf, 0, mac.length); if (firstStep) { firstStep = false; } else { sumbuf = CM5func(buf, 0, mac); } gost28147MacFunc(workingKey, sumbuf, 0, mac, 0); bufOff = 0; } buf[bufOff++] = in; }
gost28147MacFunc(workingKey, sumbuf, 0, mac, 0); gost28147MacFunc(workingKey, sumbuf, 0, mac, 0);
public int doFinal(byte[] out, int outOff) throws DataLengthException, IllegalStateException { //padding with zero while (bufOff < blockSize) { buf[bufOff] = 0; bufOff++; } byte[] sumbuf = new byte[buf.length]; System.arraycopy(buf, 0, sumbuf, 0, mac.length); if (firstStep) { firstStep = false; } else { sumbuf = CM5func(buf, 0, mac); } gost28147MacFunc(workingKey, sumbuf, 0, mac, 0); System.arraycopy(mac, (mac.length/2)-macSize, out, outOff, macSize); reset(); return macSize; }
public int doFinal(byte[] out, int outOff) throws DataLengthException, IllegalStateException { //padding with zero while (bufOff < blockSize) { buf[bufOff] = 0; bufOff++; } byte[] sumbuf = new byte[buf.length]; System.arraycopy(buf, 0, sumbuf, 0, mac.length); if (firstStep) { firstStep = false; } else { sumbuf = CM5func(buf, 0, mac); } gost28147MacFunc(workingKey, sumbuf, 0, mac, 0); System.arraycopy(mac, (mac.length/2)-macSize, out, outOff, macSize); reset(); return macSize; }
public void update(byte in) throws IllegalStateException { if (bufOff == buf.length) { byte[] sumbuf = new byte[buf.length]; System.arraycopy(buf, 0, sumbuf, 0, mac.length); if (firstStep) { firstStep = false; if (macIV != null) { sumbuf = CM5func(buf, 0, macIV); } } else { sumbuf = CM5func(buf, 0, mac); } gost28147MacFunc(workingKey, sumbuf, 0, mac, 0); bufOff = 0; } buf[bufOff++] = in; }
gost28147MacFunc(workingKey, sumbuf, 0, mac, 0); gost28147MacFunc(workingKey, sumbuf, 0, mac, 0);