Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getSHA256Sum (0.27 sec)

  1. cmd/hasher.go

    )
    
    // getSHA256Hash returns SHA-256 hash in hex encoding of given data.
    func getSHA256Hash(data []byte) string {
    	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.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri May 27 13:00:19 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  2. cmd/xl-storage_test.go

    		{
    			volume, "abcd", 14, 1, nil, errFileNotFound,
    		},
    	}
    
    	// Create all files needed during testing.
    	appendFiles := testCases[:4]
    	v := NewBitrotVerifier(SHA256, getSHA256Sum([]byte("hello, world")))
    	// Create test files for further reading.
    	for i, appendFile := range appendFiles {
    		err = xlStorage.AppendFile(context.Background(), volume, appendFile.fileName, []byte("hello, world"))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 17:45:28 GMT 2024
    - 66.7K bytes
    - Viewed (0)
Back to top