- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for EncryptRequest (0.45 sec)
-
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/v1beta1/kms_plugin_mock.go
_, gRPCErr = plugin.Encrypt(context.Background(), &kmsapi.EncryptRequest{Plain: []byte("foo")}) return gRPCErr == nil, nil }) if pollErr != nil { return fmt.Errorf("failed to start KMS plugin, gRPC error: %v, poll error: %v", gRPCErr, pollErr) } return nil } // LastEncryptRequest returns the last EncryptRequest.Plain sent to the plugin. func (s *Base64Plugin) LastEncryptRequest() []byte {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 29 05:36:41 UTC 2023 - 5.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/testing/v2/kms_plugin_mock.go
if err != nil { return nil, err } return &kmsapi.DecryptResponse{Plaintext: buf[:n]}, nil } // Encrypt performs base64 encoding of the payload of kms.EncryptRequest. func (s *Base64Plugin) Encrypt(ctx context.Context, request *kmsapi.EncryptRequest) (*kmsapi.EncryptResponse, error) { klog.V(3).InfoS("Received Encrypt Request", "plaintext", string(request.Plaintext)) s.mu.Lock() defer s.mu.Unlock()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 21 19:25:52 UTC 2023 - 6.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/grpc_service.go
// Encrypt bytes to a string ciphertext. func (g *gRPCService) Encrypt(plain []byte) ([]byte, error) { ctx, cancel := context.WithTimeout(context.Background(), g.callTimeout) defer cancel() request := &kmsapi.EncryptRequest{Plain: plain, Version: kmsapiVersion} response, err := g.kmsClient.Encrypt(ctx, request) if err != nil { return nil, err } return response.Cipher, nil } func (g *gRPCService) interceptor(
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Feb 27 00:47:46 UTC 2023 - 4.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope/kmsv2/grpc_service.go
func (g *gRPCService) Encrypt(ctx context.Context, uid string, plaintext []byte) (*kmsservice.EncryptResponse, error) { ctx, cancel := context.WithTimeout(ctx, g.callTimeout) defer cancel() request := &kmsapi.EncryptRequest{ Plaintext: plaintext, Uid: uid, } response, err := g.kmsClient.Encrypt(ctx, request) if err != nil { return nil, err } return &kmsservice.EncryptResponse{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 23:18:16 UTC 2023 - 4.6K bytes - Viewed (0) -
cmd/encryption-v1.go
} _, err = newEncryptMetadata(r.Context(), kind, keyID, key, bucket, object, metadata, kmsCtx) return } // EncryptRequest takes the client provided content and encrypts the data // with the client provided key. It also marks the object as client-side-encrypted // and sets the correct headers. func EncryptRequest(content io.Reader, r *http.Request, bucket, object string, metadata map[string]string) (io.Reader, crypto.ObjectKey, error) {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Thu Jun 13 06:56:12 UTC 2024 - 37.1K bytes - Viewed (0) -
cmd/encryption-v1_test.go
for i, test := range encryptRequestTests { content := bytes.NewReader(make([]byte, 64)) req := &http.Request{Header: http.Header{}} for k, v := range test.header { req.Header.Set(k, v) } _, _, err := EncryptRequest(content, req, "bucket", "object", test.metadata) if err != nil { t.Fatalf("Test %d: Failed to encrypt request: %v", i, err) } if kdf, ok := test.metadata[crypto.MetaAlgorithm]; !ok {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Sep 24 04:17:08 UTC 2022 - 19.9K bytes - Viewed (0) -
cmd/object-multipart-handlers.go
metadata[ReservedMetadataPrefixLower+ReplicationStatus] = dsc.PendingStatus() } // We need to preserve the encryption headers set in EncryptRequest, // so we do not want to override them, copy them instead. for k, v := range encMetadata { metadata[k] = v } // Ensure that metadata does not contain sensitive information
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 14 13:28:35 UTC 2024 - 38.8K bytes - Viewed (0) -
cmd/object-handlers.go
} // Store the preserved compression metadata. for k, v := range compressMetadata { srcInfo.UserDefined[k] = v } // We need to preserve the encryption headers set in EncryptRequest, // so we do not want to override them, copy them instead. for k, v := range encMetadata { srcInfo.UserDefined[k] = v } // Ensure that metadata does not contain sensitive information
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 14 13:28:35 UTC 2024 - 124.2K bytes - Viewed (0)