Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 62 for putString (0.28 sec)

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

        assertEquals(
            HashCode.fromBytes(mac.doFinal("!!!".getBytes(UTF_8))),
            Hashing.hmacSha1(SHA1_KEY)
                .newHasher()
                .putString("hello", UTF_8)
                .putString("world", UTF_8)
                .putString("!!!", UTF_8)
                .hash());
      }
    
      public void testCustomKey() throws Exception {
        SecretKey customKey =
            new SecretKey() {
              @Override
    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)
  2. android/guava/src/com/google/common/hash/Hasher.java

       * running the same hash function on the equivalent input. For cross-language compatibility, use
       * {@link #putString}, usually with a charset of UTF-8. For other use cases, use {@code
       * putUnencodedChars}.
       *
       * @since 15.0 (since 11.0 as putString(CharSequence)).
       */
      @CanIgnoreReturnValue
      @Override
      Hasher putUnencodedChars(CharSequence charSequence);
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 5.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

        assertEquals(
            HashCode.fromBytes(mac.doFinal("!!!".getBytes(UTF_8))),
            Hashing.hmacSha1(SHA1_KEY)
                .newHasher()
                .putString("hello", UTF_8)
                .putString("world", UTF_8)
                .putString("!!!", UTF_8)
                .hash());
      }
    
      public void testCustomKey() throws Exception {
        SecretKey customKey =
            new SecretKey() {
              @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        }
        assertHash(expected, murmur3_32_fixed().hashString(string, charset));
        assertHash(expected, murmur3_32().newHasher().putString(string, charset).hash());
        assertHash(expected, murmur3_32_fixed().newHasher().putString(string, charset).hash());
        assertHash(expected, murmur3_32().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32_fixed().hashBytes(string.getBytes(charset)));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java

          }
        }
      }
    
      public void testPutAfterHash() {
        Hasher sha1 = Hashing.sha1().newHasher();
    
        assertEquals(
            "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
            sha1.putString("The quick brown fox jumps over the lazy dog", Charsets.UTF_8)
                .hash()
                .toString());
        assertThrows(IllegalStateException.class, () -> sha1.putInt(42));
      }
    
      public void testHashTwice() {
    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)
  6. guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        }
        assertHash(expected, murmur3_32_fixed().hashString(string, charset));
        assertHash(expected, murmur3_32().newHasher().putString(string, charset).hash());
        assertHash(expected, murmur3_32_fixed().newHasher().putString(string, charset).hash());
        assertHash(expected, murmur3_32().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32_fixed().hashBytes(string.getBytes(charset)));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/PrimitiveSink.java

       * running on the equivalent input. For cross-language compatibility, use {@link #putString},
       * usually with a charset of UTF-8. For other use cases, use {@code putUnencodedChars}.
       *
       * @since 15.0 (since 11.0 as putString(CharSequence))
       */
      @CanIgnoreReturnValue
      PrimitiveSink putUnencodedChars(CharSequence charSequence);
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  8. api/maven-api-core/src/main/java/org/apache/maven/api/services/Transport.java

         */
        void putString(@Nonnull String source, @Nonnull Charset charset, @Nonnull URI relativeTarget);
    
        /**
         * PUTs the source string using UTF8 charset to target URI. The target MUST BE relative from the
         * {@link RemoteRepository#getUrl()} root.
         *
         * @throws RuntimeException If PUT fails for any reason.
         */
        default void putString(@Nonnull String source, @Nonnull URI relativeTarget) {
    Java
    - Registered: Sun Apr 21 03:35:09 GMT 2024
    - Last Modified: Thu Mar 23 05:29:39 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java

          }
        }
      }
    
      public void testPutAfterHash() {
        Hasher sha1 = Hashing.sha1().newHasher();
    
        assertEquals(
            "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
            sha1.putString("The quick brown fox jumps over the lazy dog", Charsets.UTF_8)
                .hash()
                .toString());
        assertThrows(IllegalStateException.class, () -> sha1.putInt(42));
      }
    
      public void testHashTwice() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/hash/SipHashFunctionTest.java

        assertEquals(expected, SIP_WITH_KEY.hashString(input, UTF_8).asLong());
        assertEquals(expected, SIP_WITH_KEY.newHasher().putString(input, UTF_8).hash().asLong());
        assertEquals(expected, SIP_WITHOUT_KEY.hashString(input, UTF_8).asLong());
        assertEquals(expected, SIP_WITHOUT_KEY.newHasher().putString(input, UTF_8).hash().asLong());
      }
    
      private static void assertSip(byte[] input, long expected) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sun May 05 18:02:35 GMT 2019
    - 6.6K bytes
    - Viewed (0)
Back to top