Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 39 for HashFunction (0.07 seconds)

  1. android/guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java

      }
    
      @Benchmark
      int hasher(int reps) {
        HashFunction hashFunction = hashFunctionEnum.getHashFunction();
        int result = 37;
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0];
        }
        return result;
      }
    
      @Benchmark
      int hashFunction(int reps) {
        HashFunction hashFunction = hashFunctionEnum.getHashFunction();
        int result = 37;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 2.4K bytes
    - Click Count (0)
  2. guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java

      }
    
      @Benchmark
      int hasher(int reps) {
        HashFunction hashFunction = hashFunctionEnum.getHashFunction();
        int result = 37;
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0];
        }
        return result;
      }
    
      @Benchmark
      int hashFunction(int reps) {
        HashFunction hashFunction = hashFunctionEnum.getHashFunction();
        int result = 37;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 2.4K bytes
    - Click Count (0)
  3. guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java

        SHA_256("SHA-256", Hashing.sha256()),
        SHA_384("SHA-384", Hashing.sha384()),
        SHA_512("SHA-512", Hashing.sha512());
    
        private final String algorithmName;
        private final HashFunction hashFn;
    
        Algorithm(String algorithmName, HashFunction hashFn) {
          this.algorithmName = algorithmName;
          this.hashFn = hashFn;
        }
    
        MessageDigest getMessageDigest() {
          try {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Jul 14 14:44:08 GMT 2025
    - 3.5K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/hash/HashFunctionEnum.java

      // These can probably be removed sooner or later.
      ;
    
      private final HashFunction hashFunction;
    
      HashFunctionEnum(HashFunction hashFunction) {
        this.hashFunction = hashFunction;
      }
    
      HashFunction getHashFunction() {
        return hashFunction;
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 2.4K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/hash/AbstractCompositeHashFunction.java

    @Immutable
    abstract class AbstractCompositeHashFunction extends AbstractHashFunction {
    
      @SuppressWarnings("Immutable") // array not modified after creation
      final HashFunction[] functions;
    
      AbstractCompositeHashFunction(HashFunction... functions) {
        for (HashFunction function : functions) {
          checkNotNull(function);
        }
        this.functions = functions;
      }
    
      /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Feb 13 17:34:21 GMT 2025
    - 5.3K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/hash/HashingOutputStream.java

      // be (optionally) be combined with another if needed (with something like
      // MultiplexingOutputStream).
      public HashingOutputStream(HashFunction hashFunction, OutputStream out) {
        super(checkNotNull(out));
        this.hasher = checkNotNull(hashFunction.newHasher());
      }
    
      @Override
      public void write(int b) throws IOException {
        hasher.putByte((byte) b);
        out.write(b);
      }
    
      @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Dec 21 03:10:51 GMT 2024
    - 2.6K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/hash/ChecksumHashFunctionTest.java

        byte[] bytes = HashTestUtils.ascii(input);
    
        Checksum checksum = supplier.get();
        checksum.update(bytes, 0, bytes.length);
        long value = checksum.getValue();
    
        String toString = "name";
        HashFunction func = new ChecksumHashFunction(supplier, 32, toString);
        assertThat(func.toString()).isEqualTo(toString);
        assertEquals(value, func.hashBytes(bytes).padToLong());
      }
    
      private static void assertHash32(
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 3.3K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java

      //  - The algorithm name is not case-sensitive.
      @SuppressWarnings("deprecation") // We still need to test our deprecated APIs.
      private static final ImmutableMap<String, HashFunction> ALGORITHMS =
          new ImmutableMap.Builder<String, HashFunction>()
              .put("MD5", md5())
              .put("SHA", sha1()) // Not the official name, but still works
              .put("SHA1", sha1()) // Not the official name, but still works
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

      // https://docs.oracle.com/en/java/javase/25/docs/specs/security/standard-names.html#mac-algorithms
      private static final ImmutableTable<String, SecretKey, HashFunction> ALGORITHMS =
          new ImmutableTable.Builder<String, SecretKey, HashFunction>()
              .put("HmacMD5", MD5_KEY, hmacMd5(MD5_KEY))
              .put("HmacSHA1", SHA1_KEY, hmacSha1(SHA1_KEY))
              .put("HmacSHA256", SHA256_KEY, hmacSha256(SHA256_KEY))
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 14.2K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java

      //  - The algorithm name is not case-sensitive.
      @SuppressWarnings("deprecation") // We still need to test our deprecated APIs.
      private static final ImmutableMap<String, HashFunction> ALGORITHMS =
          new ImmutableMap.Builder<String, HashFunction>()
              .put("MD5", md5())
              .put("SHA", sha1()) // Not the official name, but still works
              .put("SHA1", sha1()) // Not the official name, but still works
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 4.9K bytes
    - Click Count (0)
Back to Top