Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for privPem (0.14 sec)

  1. security/pkg/pki/util/crypto.go

    	}
    }
    
    // GetRSAKeySize returns the size if it is RSA key, otherwise it returns an error.
    func GetRSAKeySize(privKey crypto.PrivateKey) (int, error) {
    	if t := reflect.TypeOf(privKey); t != reflect.TypeOf(&rsa.PrivateKey{}) {
    		return 0, fmt.Errorf("key type is not RSA: %v", t)
    	}
    	pkey := privKey.(*rsa.PrivateKey)
    	return pkey.N.BitLen(), nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 13:00:07 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. docs/debugging/inspect/decrypt-v2.go

    	error
    }
    
    func extractInspectV2(pk []byte, r io.Reader, w io.Writer, okMsg string) error {
    	privKey, err := bytesToPrivateKey(pk)
    	if err != nil {
    		return fmt.Errorf("decoding key returned: %w", err)
    	}
    
    	sr, err := estream.NewReader(r)
    	if err != nil {
    		return err
    	}
    
    	sr.SetPrivateKey(privKey)
    	sr.ReturnNonDecryptable(true)
    
    	// Debug corrupted streams.
    	if false {
    		sr.SkipEncrypted(true)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 11 21:22:47 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/pkiutil/pki_helpers.go

    	privateKeyPath := pathForKey(pkiPath, name)
    
    	// Parse the private key from a file
    	privKey, err := keyutil.PrivateKeyFromFile(privateKeyPath)
    	if err != nil {
    		return nil, errors.Wrapf(err, "couldn't load the private key file %s", privateKeyPath)
    	}
    
    	// Allow RSA and ECDSA formats only
    	var key crypto.Signer
    	switch k := privKey.(type) {
    	case *rsa.PrivateKey:
    		key = k
    	case *ecdsa.PrivateKey:
    		key = k
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 25.5K bytes
    - Viewed (0)
Back to top