Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for FromBytes (0.42 sec)

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

        Mac mac = Mac.getInstance("HmacMD5");
        mac.init(MD5_KEY);
        mac.update(input.getBytes(UTF_8));
        assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString());
        assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString());
        assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).hashString(input, UTF_8).toString());
    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)
  2. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

        Mac mac = Mac.getInstance("HmacMD5");
        mac.init(MD5_KEY);
        mac.update(input.getBytes(UTF_8));
        assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString());
        assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString());
        assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).hashString(input, UTF_8).toString());
    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)
  3. guava-tests/test/com/google/common/hash/HashCodeTest.java

        for (ExpectedHashCode expected : expectedHashCodes) {
          HashCode fromBytes = HashCode.fromBytes(expected.bytes);
          assertExpectedHashCode(expected, fromBytes);
        }
      }
    
      public void testFromBytes_copyOccurs() {
        byte[] bytes = new byte[] {(byte) 0xcd, (byte) 0xab, (byte) 0x00, (byte) 0x00};
        HashCode hashCode = HashCode.fromBytes(bytes);
        int expectedInt = 0x0000abcd;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/hash/HashCodeTest.java

        for (ExpectedHashCode expected : expectedHashCodes) {
          HashCode fromBytes = HashCode.fromBytes(expected.bytes);
          assertExpectedHashCode(expected, fromBytes);
        }
      }
    
      public void testFromBytes_copyOccurs() {
        byte[] bytes = new byte[] {(byte) 0xcd, (byte) 0xab, (byte) 0x00, (byte) 0x00};
        HashCode hashCode = HashCode.fromBytes(bytes);
        int expectedInt = 0x0000abcd;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  5. internal/s3select/sql/evaluate.go

    		}
    		return FromFloat(float64(rval)), nil
    	case bool:
    		return FromBool(rval), nil
    	case jstream.KVS:
    		bs, err := json.Marshal(result)
    		if err != nil {
    			return nil, err
    		}
    		return FromBytes(bs), nil
    	case []interface{}:
    		dst := make([]Value, len(rval))
    		for i := range rval {
    			v, err := jsonToValue(rval[i])
    			if err != nil {
    				return nil, err
    			}
    			dst[i] = *v
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 12K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/ShortsTest.java

          fail();
        } catch (IllegalArgumentException expected) {
        }
      }
    
      @GwtIncompatible // Shorts.fromBytes
      public void testFromBytes() {
        assertThat(Shorts.fromBytes((byte) 0x23, (byte) 0x45)).isEqualTo((short) 0x2345);
        assertThat(Shorts.fromBytes((byte) 0xFE, (byte) 0xDC)).isEqualTo((short) 0xFEDC);
      }
    
      @GwtIncompatible // Shorts.fromByteArray, Shorts.toByteArray
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 29 15:43:06 GMT 2024
    - 26.6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/hash/HashingTest.java

        assertEquals(hash32, Hashing.combineOrdered(ImmutableList.of(hash32)));
        assertEquals(
            HashCode.fromBytes(new byte[] {(byte) 0x80, 0, 0, 0}),
            Hashing.combineOrdered(ImmutableList.of(hash32, hash32)));
        assertEquals(
            HashCode.fromBytes(new byte[] {(byte) 0xa0, 0, 0, 0}),
            Hashing.combineOrdered(ImmutableList.of(hash32, hash32, hash32)));
        assertFalse(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/BloomFilterStrategies.java

          }
          return true;
        }
    
        private /* static */ long lowerEight(byte[] bytes) {
          return Longs.fromBytes(
              bytes[7], bytes[6], bytes[5], bytes[4], bytes[3], bytes[2], bytes[1], bytes[0]);
        }
    
        private /* static */ long upperEight(byte[] bytes) {
          return Longs.fromBytes(
              bytes[15], bytes[14], bytes[13], bytes[12], bytes[11], bytes[10], bytes[9], bytes[8]);
        }
      };
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 10.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/hash/HashingTest.java

        assertEquals(hash32, Hashing.combineOrdered(ImmutableList.of(hash32)));
        assertEquals(
            HashCode.fromBytes(new byte[] {(byte) 0x80, 0, 0, 0}),
            Hashing.combineOrdered(ImmutableList.of(hash32, hash32)));
        assertEquals(
            HashCode.fromBytes(new byte[] {(byte) 0xa0, 0, 0, 0}),
            Hashing.combineOrdered(ImmutableList.of(hash32, hash32, hash32)));
        assertFalse(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/hash/HashCode.java

       * immutability contract of {@code HashCode}. The array cannot be empty.
       *
       * @since 15.0 (since 12.0 in HashCodes)
       */
      public static HashCode fromBytes(byte[] bytes) {
        checkArgument(bytes.length >= 1, "A HashCode must contain at least 1 byte.");
        return fromBytesNoCopy(bytes.clone());
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 12.6K bytes
    - Viewed (0)
Back to top