Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for RawURLEncoding (0.16 sec)

  1. src/encoding/base64/base64_test.go

    	source := "AAAAAA"
    	want := []byte{0, 0, 0, 0}
    
    	// Direct.
    	dec1, err := RawURLEncoding.DecodeString(source)
    	if err != nil || !bytes.Equal(dec1, want) {
    		t.Errorf("RawURLEncoding.DecodeString(%q) = %x, %v, want %x, nil", source, dec1, err, want)
    	}
    
    	// Through reader. Used to fail.
    	r := NewDecoder(RawURLEncoding, bytes.NewReader([]byte(source)))
    	dec2, err := io.ReadAll(io.LimitReader(r, 100))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Sep 03 18:57:29 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  2. pkg/serviceaccount/jwt.go

    		return "", fmt.Errorf("failed to serialize public key to DER format: %v", err)
    	}
    
    	hasher := crypto.SHA256.New()
    	hasher.Write(publicKeyDERBytes)
    	publicKeyDERHash := hasher.Sum(nil)
    
    	keyID := base64.RawURLEncoding.EncodeToString(publicKeyDERHash)
    
    	return keyID, nil
    }
    
    func signerFromRSAPrivateKey(keyPair *rsa.PrivateKey) (jose.Signer, error) {
    	keyID, err := keyIDFromPublicKey(&keyPair.PublicKey)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 27 22:16:08 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  3. internal/config/identity/openid/openid.go

    			// ID, so we can get a short roleARN that stays the same on
    			// restart.
    			var resourceID string
    			{
    				h := sha1.New()
    				h.Write([]byte(p.ClientID))
    				bs := h.Sum(nil)
    				resourceID = base64.RawURLEncoding.EncodeToString(bs)
    			}
    			p.roleArn, err = arn.NewIAMRoleARN(resourceID, serverRegion)
    			if err != nil {
    				return c, config.Errorf("unable to generate ARN from the OpenID config: %v", err)
    			}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  4. cmd/erasure-multipart.go

    	"github.com/minio/pkg/v3/mimedb"
    	"github.com/minio/pkg/v3/sync/errgroup"
    )
    
    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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 06:56:12 UTC 2024
    - 44.8K bytes
    - Viewed (0)
  5. internal/jwt/parser.go

    	// other fields such as expiry etc.
    	return claims.Valid()
    }
    
    // base64DecodeBytes returns the bytes represented by the base64 string s.
    func base64DecodeBytes(b []byte, buf []byte) (int, error) {
    	return base64.RawURLEncoding.Decode(buf, b)
    }
    
    // ParseUnverifiedMapClaims - WARNING: Don't use this method unless you know what you're doing
    //
    // This method parses the token but doesn't validate the signature. It's only
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 09 07:53:08 UTC 2023
    - 13.9K bytes
    - Viewed (0)
  6. src/encoding/base64/base64.go

    var RawStdEncoding = StdEncoding.WithPadding(NoPadding)
    
    // RawURLEncoding is the unpadded alternate base64 encoding defined in RFC 4648.
    // It is typically used in URLs and file names.
    // This is the same as [URLEncoding] but omits padding characters.
    var RawURLEncoding = URLEncoding.WithPadding(NoPadding)
    
    /*
     * Encoder
     */
    
    // Encode encodes src using the encoding enc,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 17.6K bytes
    - Viewed (0)
  7. pkg/serviceaccount/jwt_test.go

    	dataFullSerialize := map[string]any{}
    	if err := json.Unmarshal([]byte(ecdsaTokenJWS.FullSerialize()), &dataFullSerialize); err != nil {
    		t.Fatal(err)
    	}
    
    	dataFullSerialize["malformed_iss"] = "." + base64.RawURLEncoding.EncodeToString([]byte(`{"iss":"bar"}`)) + "."
    
    	out, err := json.Marshal(dataFullSerialize)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	return string(out)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 27 22:16:08 UTC 2024
    - 17K bytes
    - Viewed (0)
  8. internal/config/identity/plugin/config.go

    	if roleID == "" {
    		// We use a hash of the plugin URL so that the ARN remains
    		// constant across restarts.
    		h := sha1.New()
    		h.Write([]byte(pluginURL))
    		bs := h.Sum(nil)
    		resourceID += base64.RawURLEncoding.EncodeToString(bs)
    	} else {
    		// Check that the roleID is restricted to URL safe characters
    		// (base64 URL encoding chars).
    		if !validRoleIDRegex.MatchString(roleID) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. pkg/kubelet/certificate/bootstrap/bootstrap.go

    	// alphabet so there is no way to have spill over collisions. Without
    	// it 'CN:foo,ORG:bar' hashes to the same value as 'CN:foob,ORG:ar'
    	const delimiter = '|'
    	encode := base64.RawURLEncoding.EncodeToString
    
    	write := func(data []byte) {
    		hash.Write([]byte(encode(data)))
    		hash.Write([]byte{delimiter})
    	}
    
    	publicKeyData, err := x509.MarshalPKIXPublicKey(publicKey)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 27 08:04:25 UTC 2022
    - 14.2K bytes
    - Viewed (0)
  10. cmd/sts-handlers.go

    	// filename characters and needs to have bounded length.
    	{
    		h := sha256.New()
    		h.Write([]byte("openid:" + subFromToken + ":" + issFromToken))
    		bs := h.Sum(nil)
    		cred.ParentUser = base64.RawURLEncoding.EncodeToString(bs)
    	}
    
    	// Deny this assume role request if the policy that the user intends to bind
    	// has a sts:DurationSeconds condition, which is not satisfied as well
    	{
    		p := policyName
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 03:13:30 UTC 2024
    - 33.9K bytes
    - Viewed (0)
Back to top