Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for FromBytes (0.19 sec)

  1. guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java

        try {
          MessageDigest digest = MessageDigest.getInstance(algorithmName);
          assertEquals(
              HashCode.fromBytes(digest.digest(input)), ALGORITHMS.get(algorithmName).hashBytes(input));
          for (int bytes = 4; bytes <= digest.getDigestLength(); bytes++) {
            assertEquals(
                HashCode.fromBytes(Arrays.copyOf(digest.digest(input), bytes)),
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  2. internal/s3select/csv/record.go

    				return sql.FromNull(), nil
    			}
    			return sql.FromBytes([]byte(r.csvRecord[idx])), nil
    		}
    		// TODO: Return Missing?
    		return nil, fmt.Errorf("column %v not found", name)
    	}
    
    	if index >= int64(len(r.csvRecord)) {
    		// No value found for column 'name', hence return null
    		// value
    		return sql.FromNull(), nil
    	}
    
    	return sql.FromBytes([]byte(r.csvRecord[index])), nil
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Sep 13 00:00:59 GMT 2022
    - 4.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java

        try {
          MessageDigest digest = MessageDigest.getInstance(algorithmName);
          assertEquals(
              HashCode.fromBytes(digest.digest(input)), ALGORITHMS.get(algorithmName).hashBytes(input));
          for (int bytes = 4; bytes <= digest.getDigestLength(); bytes++) {
            assertEquals(
                HashCode.fromBytes(Arrays.copyOf(digest.digest(input), bytes)),
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

       */
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      public int readUnsignedShort() throws IOException {
        byte b1 = readAndCheckByte();
        byte b2 = readAndCheckByte();
    
        return Ints.fromBytes((byte) 0, (byte) 0, b2, b1);
      }
    
      /**
       * Reads an integer as specified by {@link DataInputStream#readInt()}, except using little-endian
       * byte order.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

          return new AbstractStreamingHasher(4, 4) {
            final ByteArrayOutputStream out = new ByteArrayOutputStream();
    
            @Override
            protected HashCode makeHash() {
              return HashCode.fromBytes(out.toByteArray());
            }
    
            @Override
            protected void process(ByteBuffer bb) {
              while (bb.hasRemaining()) {
                out.write(bb.get());
              }
            }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

          return new AbstractStreamingHasher(4, 4) {
            final ByteArrayOutputStream out = new ByteArrayOutputStream();
    
            @Override
            protected HashCode makeHash() {
              return HashCode.fromBytes(out.toByteArray());
            }
    
            @Override
            protected void process(ByteBuffer bb) {
              while (bb.hasRemaining()) {
                out.write(bb.get());
              }
            }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

        Sink(int chunkSize) {
          super(chunkSize);
          this.chunkSize = chunkSize;
          this.bufferSize = chunkSize;
        }
    
        @Override
        protected HashCode makeHash() {
          return HashCode.fromBytes(out.toByteArray());
        }
    
        @Override
        protected void process(ByteBuffer bb) {
          processCalled++;
          assertEquals(ByteOrder.LITTLE_ENDIAN, bb.order());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/hash/Murmur3Hash128Test.java

      private static HashCode toHashCode(long... longs) {
        ByteBuffer bb = ByteBuffer.wrap(new byte[longs.length * 8]).order(ByteOrder.LITTLE_ENDIAN);
        for (long x : longs) {
          bb.putLong(x);
        }
        return HashCode.fromBytes(bb.array());
      }
    
      public void testParanoid() {
        HashFn hf =
            new HashFn() {
              @Override
              public byte[] hash(byte[] input, int seed) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

        Sink(int chunkSize) {
          super(chunkSize);
          this.chunkSize = chunkSize;
          this.bufferSize = chunkSize;
        }
    
        @Override
        protected HashCode makeHash() {
          return HashCode.fromBytes(out.toByteArray());
        }
    
        @Override
        protected void process(ByteBuffer bb) {
          processCalled++;
          assertEquals(ByteOrder.LITTLE_ENDIAN, bb.order());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/hash/LittleEndianByteArray.java

       *
       * <p>This abstraction allows us to use single-instruction load and put when available, or fall
       * back on the slower approach of using Longs.fromBytes(byte...).
       */
      private interface LittleEndianBytes {
        long getLongLittleEndian(byte[] array, int offset);
    
        void putLongLittleEndian(byte[] array, int offset, long value);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 9.7K bytes
    - Viewed (0)
Back to top