Home | History | Annotate | Download | only in hash

Lines Matching defs:bytes

31  * Abstract {@link Hasher} that handles converting primitives to bytes using a scratch {@code
32 * ByteBuffer} and streams all bytes to a sink to compute the hash.
46 * Updates this hasher with the given bytes.
53 * Updates this hasher with {@code len} bytes starting at {@code off} in the given buffer.
68 public Hasher putBytes(byte[] bytes) {
69 checkNotNull(bytes);
70 update(bytes);
75 public Hasher putBytes(byte[] bytes, int off, int len) {
76 checkPositionIndexes(off, off + len, bytes.length);
77 update(bytes, off, len);
82 * Updates the sink with the given number of bytes from the buffer.
84 private Hasher update(int bytes) {
86 update(scratch.array(), 0, bytes);
96 return update(Shorts.BYTES);
102 return update(Ints.BYTES);
108 return update(Longs.BYTES);
114 return update(Chars.BYTES);