- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 156 for hasher (0.09 sec)
-
internal/jwt/parser.go
} // HashBorrower keeps track of borrowed hashers and allows to return them all. type HashBorrower struct { pool *sync.Pool borrowed []hash.Hash } // Borrow a single hasher. func (h *HashBorrower) Borrow() hash.Hash { hasher := h.pool.Get().(hash.Hash) h.borrowed = append(h.borrowed, hasher) hasher.Reset() return hasher }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 17 16:45:46 UTC 2024 - 14.1K bytes - Viewed (0) -
internal/hash/checksum.go
return "SHA1" case c.Is(ChecksumSHA256): return "SHA256" case c.Is(ChecksumNone): return "" } return "invalid" } // Hasher returns a hasher corresponding to the checksum type. // Returns nil if no checksum. func (c ChecksumType) Hasher() hash.Hash { switch { case c.Is(ChecksumCRC32): return crc32.NewIEEE() case c.Is(ChecksumCRC32C): return crc32.New(crc32.MakeTable(crc32.Castagnoli))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 19 12:59:07 UTC 2024 - 12.7K bytes - Viewed (0) -
guava/src/com/google/common/hash/Murmur3_32HashFunction.java
@CanIgnoreReturnValue @Override public Hasher putInt(int i) { update(4, i); return this; } @CanIgnoreReturnValue @Override public Hasher putLong(long l) { update(4, (int) l); update(4, l >>> 32); return this; } @CanIgnoreReturnValue @Override public Hasher putChar(char c) { update(2, c); return this;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 02 13:50:22 UTC 2024 - 11.8K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/HashFunction.java
* </ul> * * <h3>Providing input to a hash function</h3> * * <p>The primary way to provide the data that your hash function should act on is via a {@link * Hasher}. Obtain a new hasher from the hash function using {@link #newHasher}, "push" the relevant * data into it using methods like {@link Hasher#putBytes(byte[])}, and finally ask for the {@code * HashCode} when finished using {@link Hasher#hash}. (See an {@linkplain #newHasher example} of
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 25 18:22:59 UTC 2021 - 10.9K bytes - Viewed (0) -
guava/src/com/google/common/hash/HashFunction.java
* </ul> * * <h3>Providing input to a hash function</h3> * * <p>The primary way to provide the data that your hash function should act on is via a {@link * Hasher}. Obtain a new hasher from the hash function using {@link #newHasher}, "push" the relevant * data into it using methods like {@link Hasher#putBytes(byte[])}, and finally ask for the {@code * HashCode} when finished using {@link Hasher#hash}. (See an {@linkplain #newHasher example} of
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 25 18:22:59 UTC 2021 - 10.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashingTest.java
HashCode hash31 = HashCode.fromInt(31); HashCode hash32 = HashCode.fromInt(32); assertEquals(hash32, Hashing.combineUnordered(ImmutableList.of(hash32))); assertEquals(HashCode.fromInt(64), Hashing.combineUnordered(ImmutableList.of(hash32, hash32))); assertEquals( HashCode.fromInt(96), Hashing.combineUnordered(ImmutableList.of(hash32, hash32, hash32))); assertEquals(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 09 17:40:09 UTC 2024 - 26.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashTestUtils.java
RandomHasherAction.pickAtRandom(random2).performAction(random2, ImmutableSet.of(hasher2)); } Assert.assertEquals(expected1, hasher1.hash()); Assert.assertEquals(expected2, hasher2.hash()); } static HashCode randomHash(HashFunction hashFunction, Random random, int numActions) { Hasher hasher = hashFunction.newHasher();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 25.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/MacHashFunctionTest.java
public void testPutAfterHash() { Hasher hasher = Hashing.hmacMd5(MD5_KEY).newHasher(); assertEquals( "9753980fe94daa8ecaa82216519393a9", hasher.putString("The quick brown fox jumps over the lazy dog", UTF_8).hash().toString()); assertThrows(IllegalStateException.class, () -> hasher.putInt(42)); } public void testHashTwice() { Hasher hasher = Hashing.hmacMd5(MD5_KEY).newHasher();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 13.8K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/Hashing.java
function.bits(), function); } } @Override HashCode makeHash(Hasher[] hashers) { byte[] bytes = new byte[bits() / 8]; int i = 0; for (Hasher hasher : hashers) { HashCode newHash = hasher.hash(); i += newHash.writeBytesTo(bytes, i, newHash.bits() / 8); } return HashCode.fromBytesNoCopy(bytes); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jul 19 16:02:36 UTC 2024 - 29.3K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
} } /** * Hashes the contents of this byte source using the given hash function. * * @throws IOException if an I/O error occurs while reading from this source */ public HashCode hash(HashFunction hashFunction) throws IOException { Hasher hasher = hashFunction.newHasher(); copyTo(Funnels.asOutputStream(hasher)); return hasher.hash(); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 26.2K bytes - Viewed (0)