@Override public void reset() { checkSumGenerator.reset(); }
@Override public byte[] getCheckSum() { byte[] returnedCheckSum = new byte[ByteUtils.SIZE_OF_LONG]; ByteUtils.writeLong(returnedCheckSum, checkSumGenerator.getValue(), 0); checkSumGenerator.reset(); return returnedCheckSum; }
public void init() { unencryptedLength = 0; encrypted = null; crc.reset(); } }
private void init() { _size = -1; _nextWrite = 0; _stateBegin = -1; _blocks = -1; _crc.reset(); if (_dataBuf != null) releaseReadBuf(_dataBuf); _dataBuf = null; _curReadBlockIndex = 0; }
/** * Reset the checksum. */ protected void reset() { chk.reset(); }
@Override protected void engineReset() { _adler.reset(); } }
/** * Creates a new instance of the <code>Adler32</code> class. * The checksum starts off with a value of 1. */ public Adler32 () { reset(); }
/** * @see java.util.zip.Checksum#reset */ public void reset() { this.intern.reset(); this.adler = 1; }
/** * @see java.util.zip.Checksum#reset */ public void reset() { this.intern.reset(); this.adler = 1; }
/** * Reset the checksum. */ protected void reset() { chk.reset(); }
/** * @see java.util.zip.Checksum#reset */ public void reset() { this.intern.reset(); this.adler = 1; }
@Override public void engineReset(){ _zipAdler.reset() ; } @Override
public int checksum(final byte[] buf, int off, int sze) { assert buf != null; // reset before computing the checksum. chk.reset(); chk.update(buf, off, sze); /* * The Adler checksum is a 32-bit value. */ return (int) chk.getValue(); }
public int checksum(final byte[] buf, int off, int sze) { assert buf != null; // reset before computing the checksum. chk.reset(); chk.update(buf, off, sze); /* * The Adler checksum is a 32-bit value. */ return (int) chk.getValue(); }
int checkSum(byte[] data, int offset, int nbytes) { mAdler32.reset(); mAdler32.update(data, offset, nbytes); return (int) mAdler32.getValue(); }
int checkSum(byte[] data) { mAdler32.reset(); mAdler32.update(data); return (int) mAdler32.getValue(); }
private void testAdler32() { Adler32 ad = new Adler32(); byte[] data = new byte[10000]; for (int n = 0; n < data.length; n++) data[n] = (byte) (n * n); ad.reset(); ad.update(data, 0, 10000); System.out.println(ad.getValue()); ad.update(data, 5000, 5000); System.out.println(ad.getValue()); }
byte[] internalHash(byte[] leftChildSig, byte[] rightChildSig) { crc.reset(); crc.update(leftChildSig); crc.update(rightChildSig); return longToByteArray(crc.getValue()); }
public int checksum(final IByteArraySlice slice) { assert slice != null; // reset before computing the checksum. chk.reset(); chk.update(slice.array(), slice.off(), slice.len()); /* * The Adler checksum is a 32-bit value. */ return (int) chk.getValue(); }
public int checksum(final IByteArraySlice slice) { assert slice != null; // reset before computing the checksum. chk.reset(); chk.update(slice.array(), slice.off(), slice.len()); /* * The Adler checksum is a 32-bit value. */ return (int) chk.getValue(); }