Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 68 for Sum (0.14 sec)

  1. cmd/bitrot.go

    		}
    		var (
    			hash = algorithm.New()
    			msg  = make([]byte, 0, hash.Size()*hash.BlockSize())
    			sum  = make([]byte, 0, hash.Size())
    		)
    		for i := 0; i < hash.Size()*hash.BlockSize(); i += hash.Size() {
    			hash.Write(msg)
    			sum = hash.Sum(sum[:0])
    			msg = append(msg, sum...)
    			hash.Reset()
    		}
    		if !bytes.Equal(sum, checksum) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  2. tests/joins_test.go

    	iv := DB.Table(`table_invoices`).Select(`seller, SUM(total) as total, SUM(paid) as paid, SUM(balance) as balance`).Group(`seller`)
    	stmt = dryDB.Table(`table_employees`).Select(`id, name, iv.total, iv.paid, iv.balance`).Joins(`LEFT JOIN (?) AS iv ON iv.seller = table_employees.id`, iv).Scan(&user).Statement
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Apr 26 14:19:32 GMT 2023
    - 13.5K bytes
    - Viewed (1)
  3. docs/debugging/s3-verify/main.go

    			targetFailed = true
    		}
    	}()
    	wg.Wait()
    
    	sobj.Close()
    	tobj.Close()
    
    	if !sourceFailed && !targetFailed {
    		ssum := srcSha256.Sum(nil)
    		tsum := tgtSha256.Sum(nil)
    		allgood = bytes.Equal(ssum, tsum)
    		if !allgood {
    			fmt.Printf("sha256 sum mismatch: %s -> Expected(%x), Found(%x)\n", srcCtnt.Key, ssum, tsum)
    		}
    	}
    
    	return allgood
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jun 22 15:12:47 GMT 2022
    - 8.4K bytes
    - Viewed (0)
  4. internal/kms/single-key.go

    	} else {
    		algorithm = algorithmChaCha20Poly1305
    	}
    
    	var aead cipher.AEAD
    	switch algorithm {
    	case algorithmAESGCM:
    		mac := hmac.New(sha256.New, kms.key)
    		mac.Write(iv)
    		sealingKey := mac.Sum(nil)
    
    		var block cipher.Block
    		block, err = aes.NewCipher(sealingKey)
    		if err != nil {
    			return DEK{}, err
    		}
    		aead, err = cipher.NewGCM(block)
    		if err != nil {
    			return DEK{}, err
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  5. tests/group_by_test.go

    	var total int
    	if err := DB.Model(&User{}).Select("name, sum(age)").Where("name = ?", "groupby").Group("name").Row().Scan(&name, &total); err != nil {
    		t.Errorf("no error should happen, but got %v", err)
    	}
    
    	if name != "groupby" || total != 60 {
    		t.Errorf("name should be groupby, but got %v, total should be 60, but got %v", name, total)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  6. docs/debugging/s3-check-md5/main.go

    	debug                          bool
    	versions                       bool
    	insecure                       bool
    )
    
    // getMD5Sum returns MD5 sum of given data.
    func getMD5Sum(data []byte) []byte {
    	hash := md5.New()
    	hash.Write(data)
    	return hash.Sum(nil)
    }
    
    func main() {
    	flag.StringVar(&endpoint, "endpoint", "https://play.min.io", "S3 endpoint URL")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Feb 17 01:15:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  7. istioctl/pkg/metrics/metrics_test.go

    	mockProm := mockPromAPI{
    		cannedResponse: map[string]prometheus_model.Value{
    			"sum(rate(istio_requests_total{destination_workload=~\"details.*\", destination_workload_namespace=~\".*\",reporter=\"destination\"}[1m0s]))": prometheus_model.Vector{ // nolint: lll
    				&prometheus_model.Sample{Value: 0.04},
    			},
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Oct 25 02:07:44 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  8. cmd/hasher.go

    	return hex.EncodeToString(getSHA256Sum(data))
    }
    
    // getSHA256Hash returns SHA-256 sum of given data.
    func getSHA256Sum(data []byte) []byte {
    	hash := sha256.New()
    	hash.Write(data)
    	return hash.Sum(nil)
    }
    
    // getMD5Sum returns MD5 sum of given data.
    func getMD5Sum(data []byte) []byte {
    	hash := md5.New()
    	hash.Write(data)
    	return hash.Sum(nil)
    }
    
    // getMD5Hash returns MD5 hash in hex encoding of given data.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 27 13:00:19 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  9. cmd/encryption-v1_test.go

    			}
    			return a
    		}
    		lsum = func(s []int64) int64 {
    			sum := int64(0)
    			for _, i := range s {
    				if i < 0 {
    					return -1
    				}
    				sum += i
    			}
    			return sum
    		}
    		esum = func(oi ObjectInfo) int64 {
    			sum := int64(0)
    			for _, i := range oi.Parts {
    				sum += i.Size
    			}
    			return sum
    		}
    	)
    
    	s1 := []int64{5487701, 5487799, 3}
    	s2 := repeat(5487701, 5)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Sep 24 04:17:08 GMT 2022
    - 19.9K bytes
    - Viewed (0)
  10. internal/crypto/key.go

    		unsealConfig = sio.Config{MinVersion: sio.Version20, Key: mac.Sum(nil), CipherSuites: fips.DARECiphers()}
    	case InsecureSealAlgorithm:
    		sha := sha256.New()
    		sha.Write(extKey)
    		sha.Write(sealedKey.IV[:])
    		unsealConfig = sio.Config{MinVersion: sio.Version10, Key: sha.Sum(nil), CipherSuites: fips.DARECiphers()}
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 19 20:28:10 GMT 2024
    - 6.4K bytes
    - Viewed (0)
Back to top