Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for decode (0.18 sec)

  1. cmd/erasure-decode.go

    	}
    
    	// If we cannot decode, just return read quorum error.
    	return nil, fmt.Errorf("%w (offline-disks=%d/%d)", errErasureReadQuorum, disksNotFound, len(p.readers))
    }
    
    // Decode reads from readers, reconstructs data if needed and writes the data to the writer.
    // A set of preferred drives can be supplied. In that case they will be used and the data reconstructed.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 21 14:36:21 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  2. cmd/batch-job-common-types.go

    // UnmarshalYAML - BatchJobKV extends default unmarshal to extract line, col information.
    func (kv *BatchJobKV) UnmarshalYAML(val *yaml.Node) error {
    	type jobKV BatchJobKV
    	var tmp jobKV
    	err := val.Decode(&tmp)
    	if err != nil {
    		return err
    	}
    	*kv = BatchJobKV(tmp)
    	kv.line, kv.col = val.Line, val.Column
    	return nil
    }
    
    // Validate returns an error if key is empty
    func (kv BatchJobKV) Validate() error {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 03:13:30 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  3. internal/config/policy/opa/config.go

    		Result bool `json:"result"`
    	}
    
    	respBody := bytes.NewReader(opaRespBytes)
    
    	var result opaResult
    	if err = json.NewDecoder(respBody).Decode(&result); err != nil {
    		respBody.Seek(0, 0)
    		var resultAllow opaResultAllow
    		if err = json.NewDecoder(respBody).Decode(&resultAllow); err != nil {
    			return false, err
    		}
    		return resultAllow.Result.Allow, nil
    	}
    
    	return result.Result, nil
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. internal/config/identity/openid/jwks.go

    	errMalformedJWKECKey  = errors.New("malformed JWK EC key")
    )
    
    // DecodePublicKey - decodes JSON Web Key (JWK) as public key
    func (key *JWKS) DecodePublicKey() (crypto.PublicKey, error) {
    	switch key.Kty {
    	case "RSA":
    		if key.N == "" || key.E == "" {
    			return nil, errMalformedJWKRSAKey
    		}
    
    		// decode exponent
    		ebuf, err := base64.RawURLEncoding.DecodeString(key.E)
    		if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Apr 02 23:02:35 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  5. internal/config/certs.go

    	// Trimming leading and tailing white spaces.
    	data = bytes.TrimSpace(data)
    
    	// Parse all certs in the chain.
    	current := data
    	for len(current) > 0 {
    		var pemBlock *pem.Block
    		if pemBlock, current = pem.Decode(current); pemBlock == nil {
    			return nil, ErrTLSUnexpectedData(nil).Msg("Could not read PEM block from file %s", certFile)
    		}
    
    		var x509Cert *x509.Certificate
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. internal/config/crypto_test.go

    	},
    }
    
    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.NewBuiltin("my-key", key)
    	if err != nil {
    		t.Fatalf("Failed to create KMS: %v", err)
    	}
    
    	for i, test := range encryptDecryptTests {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  7. internal/bucket/lifecycle/delmarker-expiration.go

    package lifecycle
    
    import (
    	"encoding/xml"
    	"time"
    )
    
    var errInvalidDaysDelMarkerExpiration = Errorf("Days must be a positive integer with DelMarkerExpiration")
    
    // DelMarkerExpiration used to xml encode/decode ILM action by the same name
    type DelMarkerExpiration struct {
    	XMLName xml.Name `xml:"DelMarkerExpiration"`
    	Days    int      `xml:"Days,omitempty"`
    }
    
    // Empty returns if a DelMarkerExpiration XML element is empty.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  8. internal/config/policy/plugin/config.go

    		Result bool `json:"result"`
    	}
    
    	respBody := bytes.NewReader(opaRespBytes)
    
    	var result opaResult
    	if err = json.NewDecoder(respBody).Decode(&result); err != nil {
    		respBody.Seek(0, 0)
    		var resultAllow opaResultAllow
    		if err = json.NewDecoder(respBody).Decode(&resultAllow); err != nil {
    			return false, err
    		}
    		return resultAllow.Result.Allow, nil
    	}
    
    	return result.Result, nil
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. internal/kms/secret-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)
    		}
    		plaintext, err := KMS.Decrypt(context.TODO(), &DecryptRequest{
    			Name:           test.KeyID,
    			Ciphertext:     []byte(test.Ciphertext),
    			AssociatedData: test.Context,
    		})
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  10. internal/config/identity/openid/providercfg.go

    		// respBytes, _ := httputil.DumpResponse(resp, true)
    		// fmt.Println(string(respBytes))
    		return nil, errors.New(resp.Status)
    	}
    
    	claims := map[string]interface{}{}
    	if err = json.NewDecoder(resp.Body).Decode(&claims); err != nil {
    		// uncomment this for debugging when needed.
    		// reqBytes, _ := httputil.DumpRequest(req, false)
    		// fmt.Println(string(reqBytes))
    		// respBytes, _ := httputil.DumpResponse(resp, true)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top