Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for putString (3.27 sec)

  1. 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)
  2. 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 May 03 12:43:13 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/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)
  4. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K 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. 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)
  7. 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 May 05 03:35:11 GMT 2024
    - Last Modified: Thu Mar 23 05:29:39 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putBytes(s.getBytes(UTF_16LE)).hash());
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        TestHasher hasher = new TestHasher();
        hasher.putFloat(Float.intBitsToFloat(0x04030201));
        hasher.assertBytes(new byte[] {1, 2, 3, 4});
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/AbstractHasher.java

        for (int i = 0, len = charSequence.length(); i < len; i++) {
          putChar(charSequence.charAt(i));
        }
        return this;
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putString(CharSequence charSequence, Charset charset) {
        return putBytes(charSequence.toString().getBytes(charset));
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putBytes(byte[] bytes) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 3.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putBytes(s.getBytes(UTF_16LE)).hash());
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        TestHasher hasher = new TestHasher();
        hasher.putFloat(Float.intBitsToFloat(0x04030201));
        hasher.assertBytes(new byte[] {1, 2, 3, 4});
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
Back to top