Home | History | Annotate | Download | only in hash

Lines Matching defs:bytes

35   private final int bytes;
41 this.bytes = prototype.getDigestLength();
46 MessageDigestHashFunction(String algorithmName, int bytes, String toString) {
50 checkArgument(bytes >= 4 && bytes <= maxLength,
51 "bytes (%s) must be >= 4 and < %s", bytes, maxLength);
52 this.bytes = bytes;
66 return bytes * Byte.SIZE;
84 return new MessageDigestHasher((MessageDigest) prototype.clone(), bytes);
89 return new MessageDigestHasher(getMessageDigest(prototype.getAlgorithm()), bytes);
94 private final int bytes;
97 private SerializedForm(String algorithmName, int bytes, String toString) {
99 this.bytes = bytes;
104 return new MessageDigestHashFunction(algorithmName, bytes, toString);
111 return new SerializedForm(prototype.getAlgorithm(), bytes, toString);
120 private final int bytes;
123 private MessageDigestHasher(MessageDigest digest, int bytes) {
125 this.bytes = bytes;
154 return (bytes == digest.getDigestLength())
156 : HashCode.fromBytesNoCopy(Arrays.copyOf(digest.digest(), bytes));