@Override protected void update(byte b) { checkNotDone(); digest.update(b); }
@Override protected void update(byte[] b, int off, int len) { checkNotDone(); digest.update(b, off, len); }
@Override protected void update(ByteBuffer bytes) { checkNotDone(); digest.update(bytes); }
@Override public Hasher putBytes(byte[] bytes, int off, int len) { checkNotDone(); checkPositionIndexes(off, off + len, bytes.length); digest.update(bytes, off, len); return this; }
@Override public Hasher putBytes(byte[] bytes) { checkNotDone(); digest.update(bytes); return this; }
@Override public Hasher putByte(byte b) { checkNotDone(); digest.update(b); return this; }
@Override public Hasher putDouble(double d) { checkNotDone(); scratch.putDouble(d); digest.update(scratch.array(), 0, 8); scratch.clear(); return this; }
@Override public Hasher putShort(short s) { checkNotDone(); scratch.putShort(s); digest.update(scratch.array(), 0, Shorts.BYTES); scratch.clear(); return this; }
@Override protected void update(byte b) { checkNotDone(); digest.update(b); }
@Override protected void update(byte[] b) { checkNotDone(); digest.update(b); }
@Override public HashCode hash() { checkNotDone(); done = true; return (bytes == digest.getDigestLength()) ? HashCode.fromBytesNoCopy(digest.digest()) : HashCode.fromBytesNoCopy(copyOf(digest.digest(), bytes)); } }
@Override protected void update(ByteBuffer bytes) { checkNotDone(); digest.update(bytes); }
@Override protected void update(byte[] b, int off, int len) { checkNotDone(); digest.update(b, off, len); }
@Override public HashCode hash() { checkNotDone(); done = true; return (bytes == digest.getDigestLength()) ? HashCode.fromBytesNoCopy(digest.digest()) : HashCode.fromBytesNoCopy(Arrays.copyOf(digest.digest(), bytes)); } }
@Override protected void update(byte b) { checkNotDone(); digest.update(b); }
@Override public HashCode hash() { checkNotDone(); done = true; return (bytes == digest.getDigestLength()) ? HashCode.fromBytesNoCopy(digest.digest()) : HashCode.fromBytesNoCopy(Arrays.copyOf(digest.digest(), bytes)); } }
@Override protected void update(ByteBuffer bytes) { checkNotDone(); digest.update(bytes); }
@Override protected void update(byte[] b, int off, int len) { checkNotDone(); digest.update(b, off, len); }
@Override protected void update(byte b) { checkNotDone(); digest.update(b); }
@Override public HashCode hash() { checkNotDone(); done = true; return (bytes == digest.getDigestLength()) ? HashCode.fromBytesNoCopy(digest.digest()) : HashCode.fromBytesNoCopy(Arrays.copyOf(digest.digest(), bytes)); } }