Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 477 for wyhash (0.44 sec)

  1. src/hash/maphash/maphash_purego.go

    //go:build purego
    
    package maphash
    
    import (
    	"crypto/rand"
    	"internal/byteorder"
    	"math/bits"
    )
    
    func rthash(buf []byte, seed uint64) uint64 {
    	if len(buf) == 0 {
    		return seed
    	}
    	return wyhash(buf, seed, uint64(len(buf)))
    }
    
    func rthashString(s string, state uint64) uint64 {
    	return rthash([]byte(s), state)
    }
    
    func randUint64() uint64 {
    	buf := make([]byte, 8)
    	_, _ = rand.Read(buf)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. src/runtime/hash32.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Hashing algorithm inspired by
    // wyhash: https://github.com/wangyi-fudan/wyhash/blob/ceb019b530e2c1c14d70b79bfa2bc49de7d95bc1/Modern%20Non-Cryptographic%20Hash%20Function%20and%20Pseudorandom%20Number%20Generator.pdf
    
    //go:build 386 || arm || mips || mipsle
    
    package runtime
    
    import "unsafe"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  3. src/runtime/hash64.go

    // Copyright 2014 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Hashing algorithm inspired by
    // wyhash: https://github.com/wangyi-fudan/wyhash
    
    //go:build amd64 || arm64 || loong64 || mips64 || mips64le || ppc64 || ppc64le || riscv64 || s390x || wasm
    
    package runtime
    
    import (
    	"runtime/internal/math"
    	"unsafe"
    )
    
    const (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 17:39:28 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  4. src/runtime/rand.go

    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname cheaprand
    //go:nosplit
    func cheaprand() uint32 {
    	mp := getg().m
    	// Implement wyrand: https://github.com/wangyi-fudan/wyhash
    	// Only the platform that math.Mul64 can be lowered
    	// by the compiler should be in this list.
    	if goarch.IsAmd64|goarch.IsArm64|goarch.IsPpc64|
    		goarch.IsPpc64le|goarch.IsMips64|goarch.IsMips64le|
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 14:32:47 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. src/main/java/jcifs/internal/smb1/com/SmbComSessionSetupAndX.java

                dstIndex += this.blob.length;
            }
            else {
                System.arraycopy(this.lmHash, 0, dst, dstIndex, this.lmHash.length);
                dstIndex += this.lmHash.length;
                System.arraycopy(this.ntHash, 0, dst, dstIndex, this.ntHash.length);
                dstIndex += this.ntHash.length;
    
                dstIndex += writeString(this.accountName, dst, dstIndex);
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Sun Mar 17 10:20:23 UTC 2019
    - 8.8K bytes
    - Viewed (0)
  6. src/main/java/jcifs/smb1/smb1/SmbComSessionSetupAndX.java

                dstIndex += blob.length;
            } else {
                System.arraycopy( lmHash, 0, dst, dstIndex, lmHash.length );
                dstIndex += lmHash.length;
                System.arraycopy( ntHash, 0, dst, dstIndex, ntHash.length );
                dstIndex += ntHash.length;
        
                dstIndex += writeString( accountName, dst, dstIndex );
    Registered: Wed Jun 12 15:45:55 UTC 2024
    - Last Modified: Fri Mar 22 21:10:40 UTC 2019
    - 7.3K bytes
    - Viewed (0)
  7. src/internal/zstd/xxhash.go

    	xxhPrime64c5 = 0x27d4eb2f165667c5
    )
    
    // xxhash64 is the state of a xxHash-64 checksum.
    type xxhash64 struct {
    	len uint64    // total length hashed
    	v   [4]uint64 // accumulators
    	buf [32]byte  // buffer
    	cnt int       // number of bytes in buffer
    }
    
    // reset discards the current state and prepares to compute a new hash.
    // We assume a seed of 0 since that is what zstd uses.
    func (xh *xxhash64) reset() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 18 20:34:13 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  8. src/internal/zstd/xxhash_test.go

    		hhHash, err := strconv.ParseUint(string(hhHashBytes), 16, 64)
    		if err != nil {
    			t.Fatalf("could not parse hash %q: %v", hhHashBytes, err)
    		}
    
    		var xh xxhash64
    		xh.reset()
    		xh.update(b)
    		goHash := xh.digest()
    
    		if goHash != hhHash {
    			t.Errorf("Go hash %#x != xxhsum hash %#x", goHash, hhHash)
    		}
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:34:06 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  9. src/cmd/go/internal/cache/hash.go

    	}
    	h.Write(hashSalt)
    	if verify {
    		h.buf = new(bytes.Buffer)
    	}
    	return h
    }
    
    // Write writes data to the running hash.
    func (h *Hash) Write(b []byte) (int, error) {
    	if debugHash {
    		fmt.Fprintf(os.Stderr, "HASH[%s]: %q\n", h.name, b)
    	}
    	if h.buf != nil {
    		h.buf.Write(b)
    	}
    	return h.h.Write(b)
    }
    
    // Sum returns the hash of the data written previously.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 14 16:18:34 UTC 2021
    - 4.9K bytes
    - Viewed (0)
  10. pkg/registry/rbac/validation/rule_test.go

    			for _, s := range sli {
    				io.WriteString(hash, s)
    			}
    		}
    	}
    	writeStrings(p.Verbs, p.APIGroups, p.Resources, p.ResourceNames, p.NonResourceURLs)
    	return string(hash.Sum(nil))
    }
    
    // byHash sorts a set of policy rules by a hash of its fields
    type byHash []rbacv1.PolicyRule
    
    func (b byHash) Len() int           { return len(b) }
    func (b byHash) Less(i, j int) bool { return hashOf(b[i]) < hashOf(b[j]) }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 7.9K bytes
    - Viewed (0)
Back to top