Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 50 for ALGORITHM (0.34 sec)

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

      private String algorithm;
    
      private MessageDigest md;
    
      @BeforeExperiment
      void setUp() throws Exception {
        md = MessageDigest.getInstance(algorithm);
      }
    
      @Benchmark
      int getInstance(int reps) throws Exception {
        int retValue = 0;
        for (int i = 0; i < reps; i++) {
          retValue ^= MessageDigest.getInstance(algorithm).getDigestLength();
        }
        return retValue;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.6K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java

        MESSAGE_DIGEST_API() {
          @Override
          public byte[] hash(Algorithm algorithm, byte[] input) {
            MessageDigest md = algorithm.getMessageDigest();
            md.update(input);
            return md.digest();
          }
        },
        HASH_FUNCTION_DIRECT() {
          @Override
          public byte[] hash(Algorithm algorithm, byte[] input) {
            return algorithm.getHashFunction().hashBytes(input).asBytes();
          }
        },
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/Hashing.java

       * SipHash-2-4 algorithm</a> using a seed value of {@code k = 00 01 02 ...}.
       *
       * @since 15.0
       */
      public static HashFunction sipHash24() {
        return SipHashFunction.SIP_HASH_24;
      }
    
      /**
       * Returns a hash function implementing the <a href="https://131002.net/siphash/">64-bit
       * SipHash-2-4 algorithm</a> using the given seed.
       *
       * @since 15.0
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 09 00:37:15 GMT 2024
    - 29.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

            Hashing.hmacSha1(keyData).toString());
    
        assertEquals(
            "Hashing.hmacSha256(Key[algorithm=HmacSHA256, format=RAW])",
            Hashing.hmacSha256(SHA256_KEY).toString());
        assertEquals(
            "Hashing.hmacSha256(Key[algorithm=HmacSHA256, format=RAW])",
            Hashing.hmacSha256(keyData).toString());
    
        assertEquals(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/QuantilesAlgorithmTest.java

        }
      }
    
      public void testSingleQuantile_median() {
        double referenceValue = REFERENCE_ALGORITHM.singleQuantile(1, 2, dataset.clone());
        for (QuantilesAlgorithm algorithm : NON_REFERENCE_ALGORITHMS) {
          assertWithMessage("Mismatch between %s and %s", algorithm, REFERENCE_ALGORITHM)
              .that(algorithm.singleQuantile(1, 2, dataset.clone()))
              .isWithin(ALLOWED_ERROR)
              .of(referenceValue);
        }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/Crc32cHashFunction.java

      }
    
      @Override
      public String toString() {
        return "Hashing.crc32c()";
      }
    
      static final class Crc32cHasher extends AbstractStreamingHasher {
    
        /*
         * The striding algorithm works roughly as follows: it is universally the case that
         * CRC(x ^ y) == CRC(x) ^ CRC(y).  The approach we take is to break the message as follows,
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 21.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/LineBuffer.java

    import com.google.common.annotations.J2ktIncompatible;
    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    import java.io.IOException;
    
    /**
     * Package-protected abstract class that implements the line reading algorithm used by {@link
     * LineReader}. Line separators are per {@link java.io.BufferedReader}: line feed, carriage return,
     * or carriage return followed immediately by a linefeed.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/math/QuantilesBenchmark.java

      double median(int reps) {
        double dummy = 0.0;
        for (int i = 0; i < reps; i++) {
          dummy += algorithm.singleQuantile(1, 2, dataset(i));
        }
        return dummy;
      }
    
      @Benchmark
      double percentile90(int reps) {
        double dummy = 0.0;
        for (int i = 0; i < reps; i++) {
          dummy += algorithm.singleQuantile(90, 100, dataset(i));
        }
        return dummy;
      }
    
      @Benchmark
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

            Hashing.hmacSha1(keyData).toString());
    
        assertEquals(
            "Hashing.hmacSha256(Key[algorithm=HmacSHA256, format=RAW])",
            Hashing.hmacSha256(SHA256_KEY).toString());
        assertEquals(
            "Hashing.hmacSha256(Key[algorithm=HmacSHA256, format=RAW])",
            Hashing.hmacSha256(keyData).toString());
    
        assertEquals(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/escape/CharEscaper.java

       * from the resulting text.
       *
       * <p>If the character does not need to be escaped, this method should return {@code null}, rather
       * than a one-character array containing the character itself. This enables the escaping algorithm
       * to perform more efficiently.
       *
       * <p>An escaper is expected to be able to deal with any {@code char} value, so this method should
       * not throw any exceptions.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 6.7K bytes
    - Viewed (0)
Back to top