Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 63 for plaintext (0.4 sec)

  1. internal/kms/kes.go

    	c.lock.RLock()
    	defer c.lock.RUnlock()
    
    	plaintexts := make([][]byte, 0, len(ciphertexts))
    	for i := range ciphertexts {
    		ctxBytes, err := contexts[i].MarshalText()
    		if err != nil {
    			return nil, err
    		}
    		plaintext, err := c.client.Decrypt(ctx, keyID, ciphertexts[i], ctxBytes)
    		if err != nil {
    			return nil, err
    		}
    		plaintexts = append(plaintexts, plaintext)
    	}
    	return plaintexts, nil
    }
    
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  2. internal/config/crypto_test.go

    		var (
    			data      = make([]byte, size)
    			plaintext = bytes.NewReader(data)
    			context   = kms.Context{"key": "value"}
    		)
    		b.SetBytes(int64(size))
    		for i := 0; i < b.N; i++ {
    			ciphertext, err := Encrypt(KMS, plaintext, context)
    			if err != nil {
    				b.Fatal(err)
    			}
    			if _, err = io.Copy(io.Discard, ciphertext); err != nil {
    				b.Fatal(err)
    			}
    			plaintext.Reset(data)
    		}
    	}
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.2K bytes
    - Viewed (0)
  3. internal/kms/single-key_test.go

    	if err != nil {
    		t.Fatalf("Failed to generate key: %v", err)
    	}
    	plaintext, err := KMS.DecryptKey(key.KeyID, key.Ciphertext, Context{})
    	if err != nil {
    		t.Fatalf("Failed to decrypt key: %v", err)
    	}
    	if !bytes.Equal(key.Plaintext, plaintext) {
    		t.Fatalf("Decrypted key does not match generated one: got %x - want %x", key.Plaintext, plaintext)
    	}
    }
    
    func TestDecryptKey(t *testing.T) {
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Tue Jul 19 01:54:27 GMT 2022
    - 3K bytes
    - Viewed (0)
  4. internal/kms/single-key.go

    	plaintexts := make([][]byte, 0, len(ciphertexts))
    	for i := range ciphertexts {
    		plaintext, err := kms.DecryptKey(keyID, ciphertexts[i], contexts[i])
    		if err != nil {
    			return nil, err
    		}
    		plaintexts = append(plaintexts, plaintext)
    	}
    	return plaintexts, nil
    }
    
    // Verify verifies all KMS endpoints and returns details
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  5. istioctl/pkg/clioptions/central.go

    	cmd.PersistentFlags().BoolVar(&o.InsecureSkipVerify, "insecure", viper.GetBool("INSECURE"),
    		"Skip server certificate and domain verification. (NOT SECURE!)")
    	cmd.PersistentFlags().BoolVar(&o.Plaintext, "plaintext", viper.GetBool("PLAINTEXT"),
    		"Use plain-text HTTP/2 when connecting to server (no TLS).")
    }
    
    // ValidateControlPlaneFlags checks arguments for valid values and combinations
    Go
    - Registered: Wed Apr 17 22:53:10 GMT 2024
    - Last Modified: Mon Jun 06 03:39:27 GMT 2022
    - 3.2K bytes
    - Viewed (0)
  6. internal/etag/etag_test.go

    var decryptTests = []struct {
    	Key       []byte
    	ETag      ETag
    	Plaintext ETag
    }{
    	{ // 0
    		Key:       make([]byte, 32),
    		ETag:      must("3b83ef96387f14655fc854ddc3c6bd57"),
    		Plaintext: must("3b83ef96387f14655fc854ddc3c6bd57"),
    	},
    	{ // 1
    		Key:       make([]byte, 32),
    		ETag:      must("7b976cc68452e003eec7cb0eb631a19a-1"),
    		Plaintext: must("7b976cc68452e003eec7cb0eb631a19a-1"),
    	},
    	{ // 2
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/JsseDebugLogging.kt

        enum class Type {
          Handshake,
          Plaintext,
          Encrypted,
          Setup,
          Unknown,
        }
    
        val type: Type
          get() =
            when {
              message == "adding as trusted certificates" -> Type.Setup
              message == "Raw read" || message == "Raw write" -> Type.Encrypted
              message == "Plaintext before ENCRYPTION" || message == "Plaintext after DECRYPTION" -> Type.Plaintext
    Plain Text
    - Registered: Fri Apr 12 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  8. internal/config/crypto.go

    	"github.com/secure-io/sio-go/sioutil"
    )
    
    // EncryptBytes encrypts the plaintext with a key managed by KMS.
    // The context is bound to the returned ciphertext.
    //
    // The same context must be provided when decrypting the
    // ciphertext.
    func EncryptBytes(k kms.KMS, plaintext []byte, context kms.Context) ([]byte, error) {
    	ciphertext, err := Encrypt(k, bytes.NewReader(plaintext), context)
    	if err != nil {
    		return nil, err
    	}
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  9. internal/kms/dek_test.go

    	Key DEK
    }{
    	{
    		Key: DEK{},
    	},
    	{
    		Key: DEK{
    			Plaintext:  nil,
    			Ciphertext: mustDecodeB64("eyJhZWFkIjoiQUVTLTI1Ni1HQ00tSE1BQy1TSEEtMjU2IiwiaXYiOiJ3NmhLUFVNZXVtejZ5UlVZL29pTFVBPT0iLCJub25jZSI6IktMSEU3UE1jRGo2N2UweHkiLCJieXRlcyI6Ik1wUkhjQWJaTzZ1Sm5lUGJGcnpKTkxZOG9pdkxwTmlUcTNLZ0hWdWNGYkR2Y0RlbEh1c1lYT29zblJWVTZoSXIifQ=="),
    		},
    	},
    	{
    		Key: DEK{
    			Plaintext:  mustDecodeB64("GM2UvLXp/X8lzqq0mibFC0LayDCGlmTHQhYLj7qAy7Q="),
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 2.2K bytes
    - Viewed (0)
  10. internal/kms/kms.go

    // DEK is a data encryption key. It consists of a
    // plaintext-ciphertext pair and the ID of the key
    // used to generate the ciphertext.
    //
    // The plaintext can be used for cryptographic
    // operations - like encrypting some data. The
    // ciphertext is the encrypted version of the
    // plaintext data and can be stored on untrusted
    // storage.
    type DEK struct {
    	KeyID      string
    	Plaintext  []byte
    	Ciphertext []byte
    }
    
    var (
    Go
    - Registered: Sun Apr 07 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top