Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 113 for StdEncoding (0.16 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/v1beta1/kms_plugin_mock.go

    	s.mu.Lock()
    	defer s.mu.Unlock()
    	if s.inFailedState {
    		return nil, status.Error(codes.FailedPrecondition, "failed precondition - key disabled")
    	}
    
    	buf := make([]byte, base64.StdEncoding.DecodedLen(len(request.Cipher)))
    	n, err := base64.StdEncoding.Decode(buf, request.Cipher)
    	if err != nil {
    		return nil, err
    	}
    
    	return &kmsapi.DecryptResponse{Plain: buf[:n]}, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 29 05:36:41 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  2. tests/integration/ambient/registry_setup_test.go

    	registry, err = registryredirector.New(ctx, registryredirector.Config{
    		Cluster: ctx.AllClusters().Default(),
    	})
    	if err != nil {
    		return
    	}
    
    	args := map[string]any{
    		"DockerConfigJson": base64.StdEncoding.EncodeToString(
    			[]byte(createDockerCredential(registryUser, registryPasswd, registry.Address()))),
    	}
    	if err := ctx.ConfigIstio().EvalFile(apps.Namespace.Name(), args, "testdata/registry-secret.yaml").
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 03 21:02:05 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/v2/kms_plugin_mock.go

    	}
    	if len(request.Uid) == 0 {
    		return nil, status.Error(codes.InvalidArgument, "uid is required")
    	}
    
    	buf := make([]byte, base64.StdEncoding.DecodedLen(len(request.Ciphertext)))
    	n, err := base64.StdEncoding.Decode(buf, request.Ciphertext)
    	if err != nil {
    		return nil, err
    	}
    
    	return &kmsapi.DecryptResponse{Plaintext: buf[:n]}, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 21 19:25:52 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  4. internal/hash/checksum.go

    		return ChecksumMismatch{
    			Want: fmt.Sprintf("%s-%d", c.Encoded, c.WantParts),
    			Got:  fmt.Sprintf("%s-%d", base64.StdEncoding.EncodeToString(sum), parts),
    		}
    	}
    
    	if !bytes.Equal(sum, c.Raw) {
    		return ChecksumMismatch{
    			Want: c.Encoded,
    			Got:  base64.StdEncoding.EncodeToString(sum),
    		}
    	}
    	return nil
    }
    
    // AsMap returns the
    func (c *Checksum) AsMap() map[string]string {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 08 16:18:34 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  5. cluster/gce/gci/apiserver_kms_test.go

    		desc                     string
    		encryptionProviderConfig string
    		wantFlag                 bool
    	}{
    		{
    			desc:                     "ENCRYPTION_PROVIDER_CONFIG is set",
    			encryptionProviderConfig: base64.StdEncoding.EncodeToString([]byte("foo")),
    			wantFlag:                 true,
    		},
    		{
    			desc:                     "ENCRYPTION_PROVIDER_CONFIG is not set",
    			encryptionProviderConfig: "",
    			wantFlag:                 false,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 30 06:23:50 UTC 2021
    - 6.3K bytes
    - Viewed (0)
  6. internal/crypto/header.go

    		return key, ErrMissingCustomerKeyMD5
    	}
    
    	clientKey, err := base64.StdEncoding.DecodeString(h.Get(xhttp.AmzServerSideEncryptionCopyCustomerKey))
    	if err != nil || len(clientKey) != 32 { // The client key must be 256 bits long
    		return key, ErrInvalidCustomerKey
    	}
    	keyMD5, err := base64.StdEncoding.DecodeString(h.Get(xhttp.AmzServerSideEncryptionCopyCustomerKeyMD5))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  7. pkg/credentialprovider/keyring_test.go

    			targetURL: "prefix.docker.io:1111/path",
    		},
    	}
    	for i, test := range tests {
    		email := "******@****.***"
    		username := "foo"
    		password := "bar" // Fake value for testing.
    		auth := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", username, password)))
    		sampleDockerConfig := fmt.Sprintf(`{
       "%s": {
         "email": %q,
         "auth": %q
       }
    }`, test.globURL, email, auth)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 15 10:47:22 UTC 2023
    - 15.1K bytes
    - Viewed (0)
  8. src/mime/encodedword.go

    	// 2-byte footer.
    	maxContentLen = maxEncodedWordLen - len("=?UTF-8?q?") - len("?=")
    )
    
    var maxBase64Len = base64.StdEncoding.DecodedLen(maxContentLen)
    
    // bEncode encodes s using base64 encoding and writes it to buf.
    func (e WordEncoder) bEncode(buf *strings.Builder, charset, s string) {
    	w := base64.NewEncoder(base64.StdEncoding, buf)
    	// If the charset is not UTF-8 or if the content is short, do not bother
    	// splitting the encoded-word.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 16:12:35 UTC 2024
    - 10K bytes
    - Viewed (0)
  9. src/image/decode_example_test.go

    	// two lines to also understand GIF and PNG images:
    	// _ "image/gif"
    	// _ "image/png"
    	_ "image/jpeg"
    )
    
    func Example_decodeConfig() {
    	reader := base64.NewDecoder(base64.StdEncoding, strings.NewReader(data))
    	config, format, err := image.DecodeConfig(reader)
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Println("Width:", config.Width, "Height:", config.Height, "Format:", format)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 29 03:16:17 UTC 2018
    - 7.5K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/mod/sumdb/note/note.go

    	privkey := append([]byte{algEd25519}, priv.Seed()...)
    	h := keyHash(name, pubkey)
    
    	skey = fmt.Sprintf("PRIVATE+KEY+%s+%08x+%s", name, h, base64.StdEncoding.EncodeToString(privkey))
    	vkey = fmt.Sprintf("%s+%08x+%s", name, h, base64.StdEncoding.EncodeToString(pubkey))
    	return skey, vkey, nil
    }
    
    // NewEd25519VerifierKey returns an encoded verifier key using the given name
    // and Ed25519 public key.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 12 20:38:21 UTC 2023
    - 20.1K bytes
    - Viewed (0)
Back to top