Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for AsBytes (0.2 sec)

  1. pkg/test/util/file/file.go

    	"istio.io/istio/pkg/test"
    )
    
    // AsBytes is a simple wrapper around os.ReadFile provided for completeness.
    func AsBytes(filename string) ([]byte, error) {
    	return os.ReadFile(filename)
    }
    
    // AsBytesOrFail calls AsBytes and fails the test if any errors occurred.
    func AsBytesOrFail(t test.Failer, filename string) []byte {
    	t.Helper()
    	content, err := AsBytes(filename)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 17 02:22:22 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

        // Trick the JVM to prevent it from using the hash function non-polymorphically
        result ^= Hashing.crc32().hashInt(reps).asBytes()[0];
        result ^= Hashing.adler32().hashInt(reps).asBytes()[0];
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
        }
        return result;
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 13 16:19:15 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  3. guava/src/com/google/common/hash/HashCode.java

      public abstract int bits();
    
      /**
       * Returns the first four bytes of {@linkplain #asBytes() this hashcode's bytes}, converted to an
       * {@code int} value in little-endian order.
       *
       * @throws IllegalStateException if {@code bits() < 32}
       */
      public abstract int asInt();
    
      /**
       * Returns the first eight bytes of {@linkplain #asBytes() this hashcode's bytes}, converted to a
       * {@code long} value in little-endian order.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 12.6K bytes
    - Viewed (0)
  4. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/classloader/TransformReplacerTest.groovy

                entry("Foo.class", INSTRUMENTED_CLASS)
                entry(MarkerResource.RESOURCE_NAME, MarkerResource.TRANSFORMED.asBytes())
    
                versionedEntry(currentJvmMajor, "Foo.class", INSTRUMENTED_VERSIONED_CLASS)
                versionedEntry(currentJvmMajor + 1, MarkerResource.RESOURCE_NAME, MarkerResource.NOT_TRANSFORMED.asBytes())
            }
    
            TransformedClassPath cp = classPath((original): transformed)
    
            expect:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 27 10:21:26 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java

          result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0];
        }
        return result;
      }
    
      @Benchmark
      int hashFunction(int reps) {
        HashFunction hashFunction = hashFunctionEnum.getHashFunction();
        int result = 37;
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
        }
        return result;
      }
    
      @Benchmark
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/HashCode.java

      public abstract int bits();
    
      /**
       * Returns the first four bytes of {@linkplain #asBytes() this hashcode's bytes}, converted to an
       * {@code int} value in little-endian order.
       *
       * @throws IllegalStateException if {@code bits() < 32}
       */
      public abstract int asInt();
    
      /**
       * Returns the first eight bytes of {@linkplain #asBytes() this hashcode's bytes}, converted to a
       * {@code long} value in little-endian order.
       *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 12.6K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/hash/HashCodeTest.java

        byte[] original = hash.asBytes();
        byte[] mutated = hash.asBytes();
        mutated[0]++;
        assertTrue(Arrays.equals(original, hash.asBytes()));
      }
    
      private static void assertReadableBytes(HashCode hashCode) {
        assertTrue(hashCode.bits() >= 32); // sanity
        byte[] hashBytes = hashCode.asBytes();
        int totalBytes = hashCode.bits() / 8;
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 13.1K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/hash/ChecksumBenchmark.java

        // Trick the JVM to prevent it from using the hash function non-polymorphically
        result ^= Hashing.crc32().hashInt(reps).asBytes()[0];
        result ^= Hashing.adler32().hashInt(reps).asBytes()[0];
        for (int i = 0; i < reps; i++) {
          result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
        }
        return result;
      }
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 13 16:19:15 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java

          public byte[] hash(Algorithm algorithm, byte[] input) {
            return algorithm.getHashFunction().hashBytes(input).asBytes();
          }
        },
        HASH_FUNCTION_VIA_HASHER() {
          @Override
          public byte[] hash(Algorithm algorithm, byte[] input) {
            return algorithm.getHashFunction().newHasher().putBytes(input).hash().asBytes();
          }
        };
        ;
    
        public abstract byte[] hash(Algorithm algorithm, byte[] input);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.5K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java

          public byte[] hash(Algorithm algorithm, byte[] input) {
            return algorithm.getHashFunction().hashBytes(input).asBytes();
          }
        },
        HASH_FUNCTION_VIA_HASHER() {
          @Override
          public byte[] hash(Algorithm algorithm, byte[] input) {
            return algorithm.getHashFunction().newHasher().putBytes(input).hash().asBytes();
          }
        };
        ;
    
        public abstract byte[] hash(Algorithm algorithm, byte[] input);
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.5K bytes
    - Viewed (0)
Back to top