Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for getMD5Hash (0.53 sec)

  1. cmd/hasher.go

    	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.
    func getMD5Hash(data []byte) string {
    	return hex.EncodeToString(getMD5Sum(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)
  2. cmd/benchmark-utils_test.go

    	textData := generateBytesData(objSize)
    	// generate md5sum for the generated data.
    	// md5sum of the data to written is required as input for PutObject.
    
    	md5hex := getMD5Hash(textData)
    	sha256hex := ""
    
    	// benchmark utility which helps obtain number of allocations and bytes allocated per ops.
    	b.ReportAllocs()
    	// the actual benchmark for PutObject starts here. Reset the benchmark timer.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  3. cmd/object-api-putobject_test.go

    			expectedError: hash.BadDigest{ExpectedMD5: invalidMD5, CalculatedMD5: getMD5Hash(nilBytes)},
    		},
    		25: {
    			bucketName: bucket, objName: object, inputData: fiveMBBytes, inputMeta: invalidMD5Header, inputDataSize: int64(len(fiveMBBytes)), expectedMd5: getMD5Hash(fiveMBBytes),
    			expectedError: hash.BadDigest{ExpectedMD5: invalidMD5, CalculatedMD5: getMD5Hash(fiveMBBytes)},
    		},
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  4. cmd/object_api_suite_test.go

    	// Create a byte array of 5MiB.
    	data := bytes.Repeat([]byte("0123456789abcdef"), 5*humanize.MiByte/16)
    	completedParts := CompleteMultipartUpload{}
    	for i := 1; i <= 10; i++ {
    		expectedETaghex := getMD5Hash(data)
    
    		var calcPartInfo PartInfo
    		calcPartInfo, err = obj.PutObjectPart(context.Background(), "bucket", "key", uploadID, i, mustGetPutObjReader(t, bytes.NewBuffer(data), int64(len(data)), expectedETaghex, ""), opts)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 32.3K bytes
    - Viewed (0)
  5. cmd/object-api-utils.go

    		if err != nil {
    			finalMD5Bytes = append(finalMD5Bytes, []byte(part.ETag)...)
    		} else {
    			finalMD5Bytes = append(finalMD5Bytes, md5Bytes...)
    		}
    	}
    	s3MD5 := fmt.Sprintf("%s-%d", getMD5Hash(finalMD5Bytes), len(parts))
    	return s3MD5
    }
    
    // Clean unwanted fields from metadata
    func cleanMetadata(metadata map[string]string) map[string]string {
    	// Remove STANDARD StorageClass
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
  6. cmd/veeam-sos-api.go

    		} else {
    			ci.Capacity = quotaSize
    		}
    		ci.Available = ci.Capacity - ci.Used
    
    		buf = encodeResponse(&ci)
    	default:
    		return nil, errFileNotFound
    	}
    
    	etag := getMD5Hash(buf)
    	r := bytes.NewReader(buf)
    
    	off, length := int64(0), r.Size()
    	if rs != nil {
    		off, length, err = rs.GetOffsetLength(r.Size())
    		if err != nil {
    			return nil, err
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 18:43:58 GMT 2024
    - 8.2K bytes
    - Viewed (2)
  7. cmd/erasure-object_test.go

    		t.Fatal(err)
    	}
    
    	res, err := objLayer.NewMultipartUpload(ctx, "bucket1", "mpartObj1", opts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	fiveMBBytes := bytes.Repeat([]byte("a"), 5*humanize.MiByte)
    	md5Hex := getMD5Hash(fiveMBBytes)
    	_, err = objLayer.PutObjectPart(ctx, "bucket1", "mpartObj1", res.UploadID, 1, mustGetPutObjReader(t, bytes.NewReader(fiveMBBytes), 5*humanize.MiByte, md5Hex, ""), opts)
    	if err != nil {
    		t.Fatal(err)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 36.8K bytes
    - Viewed (0)
  8. cmd/server_test.go

    	1234567890,1234567890,1234567890,123`
    	// Create 11MiB content where each line contains 1024 characters.
    	for i := 0; i < 11*1024; i++ {
    		buffer.WriteString(fmt.Sprintf("[%05d] %s\n", i, line))
    	}
    	putMD5 := getMD5Hash(buffer.Bytes())
    
    	objectName := "test-11Mb-object"
    	// Put object
    	buf := bytes.NewReader(buffer.Bytes())
    	// create HTTP request foe object upload.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 108K bytes
    - Viewed (0)
  9. cmd/object-api-multipart_test.go

    	}
    
    	uploadIDs = append(uploadIDs, res.UploadID)
    	// Parts with size greater than 5 MiB.
    	// Generating a 6MiB byte array.
    	validPart := bytes.Repeat([]byte("abcdef"), 1*humanize.MiByte)
    	validPartMD5 := getMD5Hash(validPart)
    	// Create multipart parts.
    	// Need parts to be uploaded before CompleteMultiPartUpload can be called tested.
    	parts := []struct {
    		bucketName      string
    		objName         string
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 77.1K bytes
    - Viewed (0)
  10. cmd/object-handlers_test.go

    		uploadIDs = append(uploadIDs, res.UploadID)
    	}
    
    	// Parts with size greater than 5 MiB.
    	// Generating a 6 MiB byte array.
    	validPart := bytes.Repeat([]byte("abcdef"), 1*humanize.MiByte)
    	validPartMD5 := getMD5Hash(validPart)
    	// Create multipart parts.
    	// Need parts to be uploaded before CompleteMultiPartUpload can be called tested.
    	parts := []struct {
    		bucketName      string
    		objName         string
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 160K bytes
    - Viewed (0)
Back to top