- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 41 for DecodeString (0.16 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/kms/dek_test.go
t.Fatalf("Test %d: ciphertext mismatch: got %x - want %x", i, key.Ciphertext, test.Key.Ciphertext) } } } func mustDecodeB64(s string) []byte { b, err := base64.StdEncoding.DecodeString(s) if err != nil { panic(err) } return b
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 2.6K bytes - Viewed (0) -
cmd/erasure-utils.go
} // Success. return totalWritten, nil } // returns deploymentID from uploadID func getDeplIDFromUpload(uploadID string) (string, error) { uploadBytes, err := base64.RawURLEncoding.DecodeString(uploadID) if err != nil { return "", fmt.Errorf("error parsing uploadID %s (%w)", uploadID, err) } slc := strings.SplitN(string(uploadBytes), ".", 2) if len(slc) != 2 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jan 31 02:11:45 UTC 2024 - 3.1K 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/api-resources.go
fetchOwner = values.Get("fetch-owner") == "true" encodingType = values.Get("encoding-type") if token = values.Get("continuation-token"); token != "" { decodedToken, err := base64.StdEncoding.DecodeString(token) if err != nil { errCode = ErrIncorrectContinuationToken return } token = string(decodedToken) } return } // Parse bucket url queries for ?uploads
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 07 18:25:26 UTC 2023 - 4.3K bytes - Viewed (0) -
cmd/site-replication.go
} if item.Versioning != nil { configData, err := base64.StdEncoding.DecodeString(*item.Versioning) if err != nil { return wrapSRErr(err) } meta.VersioningConfigXML = configData meta.VersioningConfigUpdatedAt = item.UpdatedAt } if item.Tags != nil { configData, err := base64.StdEncoding.DecodeString(*item.Tags) if err != nil { return wrapSRErr(err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 185.1K bytes - Viewed (0) -
internal/config/identity/openid/jwt_test.go
} if d != testCase.duration { t.Errorf("Test %d: Expected duration %d, got %d", i+1, testCase.duration, d) } } } func TestExpCorrect(t *testing.T) { signKey, _ := base64.StdEncoding.DecodeString("NTNv7j0TuYARvmNMmWXo6fKvM4o6nv/aUi9ryX38ZH+L1bkrnD1ObOQ8JAUmHCBq7Iy7otZcyAagBLHVKvvYaIpmMuxmARQ97jUVG16Jkpkp1wXOPsrF9zwew6TpczyHkHgX5EuLg2MeBuiT/qJACs1J0apruOOJCg/gOtkjB4c=") claimsMap := jwtm.NewMapClaims()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 8.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/bitrot.go
HighwayHash256S: "39c0407ed3f01b18d22c85db4aeff11e060ca5f43131b0126731ca197cd42313", } for algorithm := range bitrotAlgorithms { if !algorithm.Available() { continue } checksum, err := hex.DecodeString(checksums[algorithm]) if err != nil { logger.Fatal(errSelfTestFailure, fmt.Sprintf("bitrot: failed to decode %v checksum %s for selftest: %v", algorithm, checksums[algorithm], err)) } var (
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.6K bytes - Viewed (0)