HomeSort by relevance Sort by last modified time
    Searched refs:Hasher (Results 1 - 25 of 73) sorted by null

1 2 3

  /external/guava/guava/src/com/google/common/hash/
Hasher.java 22 * A {@link PrimitiveSink} that can compute a hash code after reading the input. Each hasher should
34 * <p><b>Warning:</b> Chunks of data that are put into the {@link Hasher} are not delimited.
53 public interface Hasher extends PrimitiveSink {
54 @Override Hasher putByte(byte b);
55 @Override Hasher putBytes(byte[] bytes);
56 @Override Hasher putBytes(byte[] bytes, int off, int len);
57 @Override Hasher putShort(short s);
58 @Override Hasher putInt(int i);
59 @Override Hasher putLong(long l);
64 @Override Hasher putFloat(float f)
    [all...]
AbstractCompositeHashFunction.java 25 * {@code Hasher} objects of the delegate hash functions, and in the end, they are used by
26 * {@linkplain #makeHash(Hasher[])} that constructs the final {@code HashCode}.
41 * Constructs a {@code HashCode} from the {@code Hasher} objects of the functions. Each of them
46 /* protected */ abstract HashCode makeHash(Hasher[] hashers);
49 public Hasher newHasher() {
50 final Hasher[] hashers = new Hasher[functions.length];
54 return new Hasher() {
55 @Override public Hasher putByte(byte b) {
56 for (Hasher hasher : hashers)
    [all...]
AbstractHasher.java 20 * An abstract hasher, implementing {@link #putBoolean(boolean)}, {@link #putDouble(double)},
22 * {@link #putString(CharSequence, Charset)} as prescribed by {@link Hasher}.
26 abstract class AbstractHasher implements Hasher {
27 @Override public final Hasher putBoolean(boolean b) {
31 @Override public final Hasher putDouble(double d) {
35 @Override public final Hasher putFloat(float f) {
39 @Override public Hasher putUnencodedChars(CharSequence charSequence) {
46 @Override public Hasher putString(CharSequence charSequence, Charset charset) {
AbstractByteHasher.java 31 * Abstract {@link Hasher} that handles converting primitives to bytes using a scratch {@code
41 * Updates this hasher with the given byte.
46 * Updates this hasher with the given bytes.
53 * Updates this hasher with {@code len} bytes starting at {@code off} in the given buffer.
62 public Hasher putByte(byte b) {
68 public Hasher putBytes(byte[] bytes) {
75 public Hasher putBytes(byte[] bytes, int off, int len) {
84 private Hasher update(int bytes) {
94 public Hasher putShort(short s) {
100 public Hasher putInt(int i)
    [all...]
AbstractNonStreamingHashFunction.java 34 public Hasher newHasher() {
39 public Hasher newHasher(int expectedInputSize) {
50 Hasher hasher = newHasher(len * 2); local
52 hasher.putChar(input.charAt(i));
54 return hasher.hash();
74 * In-memory stream-based implementation of Hasher.
85 public Hasher putByte(byte b) {
91 public Hasher putBytes(byte[] bytes) {
101 public Hasher putBytes(byte[] bytes, int off, int len)
    [all...]
AbstractStreamingHashFunction.java 28 * {@link Hasher#hash}.
64 @Override public Hasher newHasher(int expectedInputSize) {
70 * A convenience base class for implementors of {@code Hasher}; handles accumulating data
88 * Constructor for use by subclasses. This hasher instance will process chunks of the specified
99 * Constructor for use by subclasses. This hasher instance will process chunks of the specified
144 public final Hasher putBytes(byte[] bytes) {
149 public final Hasher putBytes(byte[] bytes, int off, int len) {
153 private Hasher putBytes(ByteBuffer readBuffer) {
179 public final Hasher putUnencodedChars(CharSequence charSequence) {
187 public final Hasher putByte(byte b)
    [all...]
HashFunction.java 33 * multibyte values (via {@link Hasher}), but this is merely a convenience; these are
92 * {@link Hasher}. Obtain a new hasher from the hash function using {@link #newHasher},
93 * "push" the relevant data into it using methods like {@link Hasher#putBytes(byte[])},
94 * and finally ask for the {@code HashCode} when finished using {@link Hasher#hash}. (See
101 * <p>Hasher accepts primitive data types, but can also accept any Object of type {@code
103 * from that object into the function. (See {@linkplain Hasher#putObject an example} of
135 * Hasher} instance that is ready to receive data. Example: <pre> {@code
143 Hasher newHasher();
151 Hasher newHasher(int expectedInputSize)
    [all...]
HashingOutputStream.java 33 private final Hasher hasher; field in class:HashingOutputStream
47 this.hasher = checkNotNull(hashFunction.newHasher());
51 hasher.putByte((byte) b);
56 hasher.putBytes(bytes, off, len);
65 return hasher.hash();
ChecksumHashFunction.java 49 public Hasher newHasher() {
59 * Hasher that updates a checksum.
HashingInputStream.java 33 private final Hasher hasher; field in class:HashingInputStream
43 this.hasher = checkNotNull(hashFunction.newHasher());
47 * Reads the next byte of data from the underlying input stream and updates the hasher with
54 hasher.putByte((byte) b);
60 * Reads the specified bytes of data from the underlying input stream and updates the hasher with
67 hasher.putBytes(bytes, off, numOfBytesRead);
101 return hasher.hash();
MessageDigestHashFunction.java 81 @Override public Hasher newHasher() {
115 * Hasher that updates a message digest.
147 checkState(!done, "Cannot re-use a Hasher after calling hash() on it");
SipHashFunction.java 67 @Override public Hasher newHasher() {
Hashing.java 427 HashCode makeHash(Hasher[] hashers) {
430 for (Hasher hasher : hashers) {
431 HashCode newHash = hasher.hash();
  /external/llvm/lib/Transforms/Utils/
NameAnonFunctions.cpp 37 MD5 Hasher;
42 Hasher.update(Name);
48 Hasher.update(Name);
53 Hasher.final(Hash);
  /external/lzma/CPP/7zip/UI/Common/
HashCalc.cpp 85 CMyComPtr<IHasher> hasher; local
87 RINOK(CreateHasher(EXTERNAL_CODECS_LOC_VARS ids[i], name, hasher));
88 if (!hasher)
89 throw "Can't create hasher";
93 hasher.QueryInterface(IID_ICompressSetCoderProperties, &scp);
97 UInt32 digestSize = hasher->GetDigestSize();
101 h.Hasher = hasher;
117 h.Hasher->Init();
126 Hashers[i].Hasher->Update(data, size);
    [all...]
HashCalc.h 28 CMyComPtr<IHasher> Hasher;
  /external/guava/guava-tests/test/com/google/common/hash/
AbstractNonStreamingHashFunctionTest.java 40 List<Hasher> hashers = ImmutableList.of(
83 Hasher h1 = new NonStreamingVersion().newHasher();
84 Hasher h2 = new NonStreamingVersion().newHasher();
101 public Hasher newHasher() {
HashingOutputStreamTest.java 31 private Hasher hasher; field in class:HashingOutputStreamTest
37 hasher = EasyMock.createMock(Hasher.class);
40 EasyMock.expect(hashFunction.newHasher()).andReturn(hasher).once();
46 EasyMock.expect(hasher.putByte((byte) b)).andReturn(hasher).once();
47 EasyMock.replay(hasher);
53 EasyMock.verify(hasher);
58 EasyMock.expect(hasher.putBytes(buf, 0, buf.length)).andReturn(hasher).once()
    [all...]
MessageDigestHashFunctionTest.java 62 Hasher sha1 = Hashing.sha1().newHasher();
76 Hasher sha1 = Hashing.sha1().newHasher();
Murmur3Hash32Test.java 62 Hasher hasher = murmur3_32(seed).newHasher();
63 Funnels.byteArrayFunnel().funnel(input, hasher);
64 return hasher.hash().asBytes();
Murmur3Hash128Test.java 72 Hasher hasher = murmur3_128(seed).newHasher();
73 Funnels.byteArrayFunnel().funnel(input, hasher);
74 return hasher.hash().asBytes();
AbstractStreamingHasherTest.java 156 Hasher controlSink = control.newHasher(1024);
158 Iterable<Hasher> sinksAndControl =
163 // We need to ensure that at least 4 bytes have been put into the hasher or else
164 // Hasher#hash will throw an ISE.
166 for (Hasher hasher : sinksAndControl) {
167 hasher.putInt(intToPut);
HashingInputStreamTest.java 35 private Hasher hasher; field in class:HashingInputStreamTest
42 hasher = EasyMock.createMock(Hasher.class);
46 EasyMock.expect(hashFunction.newHasher()).andReturn(hasher).once();
51 EasyMock.expect(hasher.putByte((byte) 'y')).andReturn(hasher).once();
52 EasyMock.replay(hasher);
59 EasyMock.verify(hasher);
63 EasyMock.expect(hasher.putBytes(aryEq(testBytes), eq(0), eq(testBytes.length))
    [all...]
  /external/llvm/lib/LTO/
ThinLTOCodeGenerator.cpp 241 SHA1 Hasher;
244 Hasher.update(LLVM_VERSION_STRING);
246 Hasher.update(LLVM_REVISION);
251 Hasher.update(ArrayRef<uint8_t>((uint8_t *)&ModHash[0], sizeof(ModHash)));
254 Hasher.update(ArrayRef<uint8_t>((uint8_t *)&F, sizeof(F)));
259 Hasher.update(ArrayRef<uint8_t>((uint8_t *)&ModHash[0], sizeof(ModHash)));
264 Hasher.update(ArrayRef<uint8_t>((const uint8_t *)&Entry.first,
266 Hasher.update(ArrayRef<uint8_t>((const uint8_t *)&Entry.second,
273 Hasher.update(
277 sys::path::append(EntryPath, CachePath, toHex(Hasher.result()))
    [all...]
  /system/core/fs_mgr/
fs_mgr_avb.cpp 99 template <typename Hasher>
103 Hasher hasher; local
105 hasher.update(verify_data.vbmeta_images[n].vbmeta_data,
110 bool matched = (memcmp(hasher.finalize(), expected_digest, Hasher::DIGEST_SIZE) == 0);

Completed in 328 milliseconds

1 2 3