- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for DecodeString (0.09 sec)
-
internal/etag/etag.go
v, ok := h["Content-Md5"] if !ok { return nil, nil } if v[0] == "" { return nil, errors.New("etag: content-md5 is set but contains no value") } b, err := base64.StdEncoding.Strict().DecodeString(v[0]) if err != nil { return nil, err } if len(b) != md5.Size { return nil, errors.New("etag: invalid content-md5") } return ETag(b), nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 10 21:09:36 UTC 2024 - 13.3K bytes - Viewed (0) -
internal/hash/reader.go
MD5, err := hex.DecodeString(md5Hex) if err != nil { return nil, BadDigest{ // TODO(aead): Return an error that indicates that an invalid ETag has been specified ExpectedMD5: md5Hex, CalculatedMD5: "", } } SHA256, err := hex.DecodeString(sha256Hex) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 19 12:59:07 UTC 2024 - 10.9K bytes - Viewed (0) -
internal/hash/reader_test.go
t.Errorf("Expected size 4, got %d", r.ActualSize()) } expectedMD5, err := hex.DecodeString("e2fc714c4727ee9395f324cd2e7f331f") if err != nil { t.Fatal(err) } if !bytes.Equal(r.MD5Current(), expectedMD5) { t.Errorf("Expected md5hex \"e2fc714c4727ee9395f324cd2e7f331f\", got %s", hex.EncodeToString(r.MD5Current())) } expectedSHA256, err := hex.DecodeString("88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589") if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 18 17:00:54 UTC 2023 - 10.3K bytes - Viewed (0) -
cmd/signature-v2.go
// as Base64 encoding of a value is not unique: // For example "aGVsbG8=" and "aGVsbG8=\r" will result in the same byte slice. signature1, err := base64.StdEncoding.DecodeString(sig1) if err != nil { return false } signature2, err := base64.StdEncoding.DecodeString(sig2) if err != nil { return false } return subtle.ConstantTimeCompare(signature1, signature2) == 1 } // Return canonical headers.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 12.2K bytes - Viewed (0) -
cmd/erasure-multipart.go
"github.com/minio/pkg/v3/sync/errgroup" "github.com/minio/sio" ) func (er erasureObjects) getUploadIDDir(bucket, object, uploadID string) string { uploadUUID := uploadID uploadBytes, err := base64.RawURLEncoding.DecodeString(uploadID) if err == nil { slc := strings.SplitN(string(uploadBytes), ".", 2) if len(slc) == 2 { uploadUUID = slc[1] } } return pathJoin(er.getMultipartSHADir(bucket, object), uploadUUID) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 44.7K bytes - Viewed (0) -
cmd/auth-handler.go
if sha256Sum, ok := r.Form[xhttp.AmzContentSha256]; ok && len(sha256Sum) > 0 { contentSHA256, err = hex.DecodeString(sha256Sum[0]) if err != nil { return ErrContentSHA256Mismatch } } } else if _, ok := r.Header[xhttp.AmzContentSha256]; !skipSHA256 && ok { contentSHA256, err = hex.DecodeString(r.Header.Get(xhttp.AmzContentSha256)) if err != nil || len(contentSHA256) == 0 { return ErrContentSHA256Mismatch
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 17 16:45:46 UTC 2024 - 26.1K bytes - Viewed (0) -
cmd/encryption-v1.go
return "", errObjectTampered } if _, err := hex.DecodeString(object.ETag[:32]); err != nil { return "", errObjectTampered } if _, err := strconv.ParseInt(object.ETag[i+1:], 10, 32); err != nil { return "", errObjectTampered } return object.ETag, nil } etag, err := hex.DecodeString(object.ETag) if err != nil { return "", err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:06:08 UTC 2024 - 37.2K bytes - Viewed (0) -
cmd/batch-rotate.go
if e.Type == ssekms && spaces { return crypto.ErrInvalidEncryptionKeyID } if e.Type == ssekms && GlobalKMS != nil { ctx := kms.Context{} if e.Context != "" { b, err := base64.StdEncoding.DecodeString(e.Context) if err != nil { return err } json := jsoniter.ConfigCompatibleWithStandardLibrary if err := json.Unmarshal(b, &ctx); err != nil { return err } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 18 17:59:03 UTC 2024 - 14.7K bytes - Viewed (0) -
internal/hash/checksum.go
} value = valSplit[0] nParts, err := strconv.Atoi(valSplit[1]) if err != nil { return nil } alg |= ChecksumMultipart wantParts = nParts } bvalue, err := base64.StdEncoding.DecodeString(value) if err != nil { return nil } c := Checksum{Type: alg, Encoded: value, Raw: bvalue, WantParts: wantParts} if !c.Valid() { return nil } return &c }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 19 12:59:07 UTC 2024 - 12.7K bytes - Viewed (0) -
cmd/xl-storage-format_test.go
xlMeta.Meta["testKey1"] = "val1" xlMeta.Meta["testKey2"] = "val2" return xlMeta } func (m *xlMetaV1Object) AddTestObjectCheckSum(partNumber int, algorithm BitrotAlgorithm, hash string) { checksum, err := hex.DecodeString(hash) if err != nil { panic(err) } m.Erasure.Checksums[partNumber-1] = ChecksumInfo{partNumber, algorithm, checksum} } // AddTestObjectPart - add a new object part in order.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 17.6K bytes - Viewed (0)