Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for sipHashMod (0.25 sec)

  1. docs/debugging/hash-set/main.go

    	"os"
    	"strings"
    
    	"github.com/dchest/siphash"
    	"github.com/google/uuid"
    )
    
    // hashes the key returning an integer based on the input algorithm.
    // This function currently supports
    // - SIPMOD
    func sipHashMod(key string, cardinality int, id [16]byte) int {
    	if cardinality <= 0 {
    		return -1
    	}
    	// use the faster version as per siphash docs
    	// https://github.com/dchest/siphash#usage
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  2. cmd/erasure-sets_test.go

    		testCase := testCase
    		key := randString(testCase.key)
    		b.Run("", func(b *testing.B) {
    			b.SetBytes(1024)
    			b.ReportAllocs()
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				sipHashMod(key, 16, testUUID)
    			}
    		})
    	}
    }
    
    // TestSipHashMod - test sip hash.
    func TestSipHashMod(t *testing.T) {
    	testCases := []struct {
    		objectName string
    		sipHash    int
    	}{
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Feb 12 07:21:56 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  3. docs/distributed/DESIGN.md

    - Choosing an erasure set for the object is decided during `PutObject()`, object names are used to find the right erasure set using the following pseudo code.
    
    ```go
    // hashes the key returning an integer.
    func sipHashMod(key string, cardinality int, id [16]byte) int {
            if cardinality <= 0 {
                    return -1
            }
            sip := siphash.New(id[:])
            sip.Write([]byte(key))
    Plain Text
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Aug 15 23:04:20 GMT 2023
    - 8K bytes
    - Viewed (0)
  4. cmd/erasure-sets.go

    	}
    	return nil
    }
    
    // hashes the key returning an integer based on the input algorithm.
    // This function currently supports
    // - CRCMOD
    // - SIPMOD
    // - all new algos.
    func sipHashMod(key string, cardinality int, id [16]byte) int {
    	if cardinality <= 0 {
    		return -1
    	}
    	// use the faster version as per siphash docs
    	// https://github.com/dchest/siphash#usage
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 37.5K bytes
    - Viewed (5)
Back to top