Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for DecodeString (0.18 sec)

  1. internal/crypto/sse-c.go

    		return key, ErrMissingCustomerKeyMD5
    	}
    
    	clientKey, err := base64.StdEncoding.DecodeString(h.Get(xhttp.AmzServerSideEncryptionCustomerKey))
    	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.AmzServerSideEncryptionCustomerKeyMD5))
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  2. internal/crypto/sse-s3.go

    	// Check whether all extracted values are well-formed
    	iv, err := base64.StdEncoding.DecodeString(b64IV)
    	if err != nil || len(iv) != 32 {
    		return keyID, kmsKey, sealedKey, errInvalidInternalIV
    	}
    	if algorithm != SealAlgorithm {
    		return keyID, kmsKey, sealedKey, errInvalidInternalSealAlgorithm
    	}
    	encryptedKey, err := base64.StdEncoding.DecodeString(b64SealedKey)
    	if err != nil || len(encryptedKey) != 64 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  3. internal/config/identity/openid/jwks.go

    	case "RSA":
    		if key.N == "" || key.E == "" {
    			return nil, errMalformedJWKRSAKey
    		}
    
    		// decode exponent
    		ebuf, err := base64.RawURLEncoding.DecodeString(key.E)
    		if err != nil {
    			return nil, errMalformedJWKRSAKey
    		}
    
    		nbuf, err := base64.RawURLEncoding.DecodeString(key.N)
    		if err != nil {
    			return nil, errMalformedJWKRSAKey
    		}
    
    		var n, e big.Int
    		n.SetBytes(nbuf)
    		e.SetBytes(ebuf)
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 02 23:02:35 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  4. internal/crypto/sse-kms.go

    	// Check whether all extracted values are well-formed
    	iv, err := base64.StdEncoding.DecodeString(b64IV)
    	if err != nil || len(iv) != 32 {
    		return keyID, kmsKey, sealedKey, ctx, errInvalidInternalIV
    	}
    	if algorithm != SealAlgorithm {
    		return keyID, kmsKey, sealedKey, ctx, errInvalidInternalSealAlgorithm
    	}
    	encryptedKey, err := base64.StdEncoding.DecodeString(b64SealedKey)
    	if err != nil || len(encryptedKey) != 64 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  5. 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))
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  6. internal/crypto/key_test.go

    }
    
    func TestDerivePartKey(t *testing.T) {
    	var key ObjectKey
    	for i, test := range derivePartKeyTest {
    		expectedPartKey, err := hex.DecodeString(test.PartKey)
    		if err != nil {
    			t.Fatalf("Test %d failed to decode expected part-key: %v", i, err)
    		}
    		partKey := key.DerivePartKey(test.PartID)
    		if !bytes.Equal(partKey[:], expectedPartKey) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 02 00:13:57 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  7. internal/config/crypto_test.go

    		Context: kms.Context{"key": "value"},
    	},
    	{
    		Data:    make([]byte, 1<<20),
    		Context: kms.Context{"key": "value", "a": "b"},
    	},
    }
    
    func TestEncryptDecrypt(t *testing.T) {
    	key, err := hex.DecodeString("ddedadb867afa3f73bd33c25499a723ed7f9f51172ee7b1b679e08dc795debcc")
    	if err != nil {
    		t.Fatalf("Failed to decode master key: %v", err)
    	}
    	KMS, err := kms.New("my-key", key)
    	if err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.2K bytes
    - Viewed (0)
  8. docs/debugging/inspect/decrypt-v1.go

    	"fmt"
    	"hash/crc32"
    	"io"
    
    	"github.com/secure-io/sio-go"
    )
    
    func extractInspectV1(keyHex string, r io.Reader, w io.Writer, okMsg string) error {
    	id, err := hex.DecodeString(keyHex[:8])
    	if err != nil {
    		return err
    	}
    	key, err := hex.DecodeString(keyHex[8:])
    	if err != nil {
    		return err
    	}
    	// Verify that CRC is ok.
    	want := binary.LittleEndian.Uint32(id)
    	got := crc32.ChecksumIEEE(key)
    	if want != got {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  9. internal/kms/single-key_test.go

    		t.Fatalf("Failed to initialize KMS: %v", err)
    	}
    
    	for i, test := range decryptKeyTests {
    		dataKey, err := base64.StdEncoding.DecodeString(test.Plaintext)
    		if err != nil {
    			t.Fatalf("Test %d: failed to decode plaintext key: %v", i, err)
    		}
    		ciphertext, err := base64.StdEncoding.DecodeString(test.Ciphertext)
    		if err != nil {
    			t.Fatalf("Test %d: failed to decode ciphertext key: %v", i, err)
    		}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jul 19 01:54:27 GMT 2022
    - 3K bytes
    - Viewed (0)
  10. cmd/object-api-input-checks.go

    		if HasSuffix(keyMarker, SlashSeparator) {
    			return InvalidUploadIDKeyCombination{
    				UploadIDMarker: uploadIDMarker,
    				KeyMarker:      keyMarker,
    			}
    		}
    		_, err := base64.RawURLEncoding.DecodeString(uploadIDMarker)
    		if err != nil {
    			return MalformedUploadID{
    				UploadID: uploadIDMarker,
    			}
    		}
    	}
    	return nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5.7K bytes
    - Viewed (0)
Back to top