Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 375 for hashss (0.92 sec)

  1. src/internal/bytealg/bytealg.go

    var MaxLen int
    
    // PrimeRK is the prime base used in Rabin-Karp algorithm.
    const PrimeRK = 16777619
    
    // HashStr returns the hash and the appropriate multiplicative
    // factor for use in Rabin-Karp algorithm.
    func HashStr[T string | []byte](sep T) (uint32, uint32) {
    	hash := uint32(0)
    	for i := 0; i < len(sep); i++ {
    		hash = hash*PrimeRK + uint32(sep[i])
    	}
    	var pow, sq uint32 = 1, PrimeRK
    	for i := len(sep); i > 0; i >>= 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 19 19:51:15 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  2. src/strings/strings.go

    	hashss, pow := bytealg.HashStrRev(substr)
    	last := len(s) - n
    	var h uint32
    	for i := len(s) - 1; i >= last; i-- {
    		h = h*bytealg.PrimeRK + uint32(s[i])
    	}
    	if h == hashss && s[last:] == substr {
    		return last
    	}
    	for i := last - 1; i >= 0; i-- {
    		h *= bytealg.PrimeRK
    		h += uint32(s[i])
    		h -= pow * uint32(s[i+n])
    		if h == hashss && s[i:i+n] == substr {
    			return i
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:48:16 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  3. src/hash/hash.go

    // Package hash provides interfaces for hash functions.
    package hash
    
    import "io"
    
    // Hash is the common interface implemented by all hash functions.
    //
    // Hash implementations in the standard library (e.g. [hash/crc32] and
    // [crypto/sha256]) implement the [encoding.BinaryMarshaler] and
    // [encoding.BinaryUnmarshaler] interfaces. Marshaling a hash implementation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 19:15:34 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/classloader/ConfigurableClassLoaderHierarchyHasherTest.groovy

            expect:
            hasher.getClassLoaderHash(runtimeLoader) == hashFor("system")
        }
    
        def "hashes unknown classloader"() {
            def unknownLoader = Mock(ClassLoader)
            expect:
            hasher.getClassLoaderHash(unknownLoader) == null
        }
    
        def "hashes hashed classloader"() {
            def hashedLoader = new DelegatingLoader(runtimeLoader)
            def hashedLoaderHash = TestHashCodes.hashCodeFrom(123456)
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 3K bytes
    - Viewed (0)
  5. platforms/core-execution/hashing/src/main/java/org/gradle/internal/hash/Hasher.java

         */
        void put(Hashable hashable);
    
        /**
         * Feed a {@code null} value into the hasher.
         */
        void putNull();
    
        /**
         * Returns the combined hash.
         *
         * If the build cache hash is invalid, an exception is thrown.
         *
         * @throws IllegalStateException if the hasher state is invalid.
         */
        HashCode hash();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jan 11 11:14:18 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. src/hash/maphash/maphash.go

    package maphash
    
    // A Seed is a random value that selects the specific hash function
    // computed by a [Hash]. If two Hashes use the same Seeds, they
    // will compute the same hash values for any given input.
    // If two Hashes use different Seeds, they are very likely to compute
    // distinct hash values for any given input.
    //
    // A Seed must be initialized by calling [MakeSeed].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 19:15:34 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  7. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/classloader/ConfigurableClassLoaderHierarchyHasher.java

                if (knownId != null) {
                    hasher.putBytes(knownId);
                    return false;
                }
                if (cl instanceof CachingClassLoader || cl instanceof MultiParentClassLoader) {
                    return true;
                }
                HashCode hash = classLoaderFactory.getClassLoaderClasspathHash(cl);
                if (hash != null) {
                    hasher.putHash(hash);
                    return true;
                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  8. src/vendor/golang.org/x/crypto/sha3/hashes.go

    // and SHAKE hash functions, as well as utility functions for hashing
    // bytes.
    
    import (
    	"hash"
    )
    
    // New224 creates a new SHA3-224 hash.
    // Its generic security strength is 224 bits against preimage attacks,
    // and 112 bits against collision attacks.
    func New224() hash.Hash {
    	return new224()
    }
    
    // New256 creates a new SHA3-256 hash.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. platforms/core-execution/hashing/src/test/groovy/org/gradle/internal/hash/HashingTest.groovy

            }*.join().toSet()
    
            then:
            hashes.size() == threadRange.size()
        }
    
        def 'null does not collide with other values'() {
            expect:
            def hasher = Hashing.newHasher()
            hasher.putNull()
            def hash = hasher.hash()
            hash != Hashing.hashString("abc")
        }
    
        def 'hash collision for bytes'() {
            def left = [[1, 2, 3], [4, 5]]
            def right = [[1, 2], [3, 4, 5]]
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:43:29 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  10. platforms/core-execution/hashing/src/main/java/org/gradle/internal/hash/HasherExtensions.java

            hasher.putInt(array.length);
            for (char c : array) {
                hasher.putInt(c);
            }
        }
    
        public static void putDoubles(Hasher hasher, double[] array) {
            hasher.putInt(array.length);
            for (double d : array) {
                hasher.putDouble(d);
            }
        }
    
        public static void putFloats(Hasher hasher, float[] array) {
            hasher.putInt(array.length);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jan 11 20:22:02 UTC 2024
    - 2K bytes
    - Viewed (0)
Back to top