Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for rsaKeySizeFromAlgorithmType (0.31 sec)

  1. cmd/kubeadm/app/util/pkiutil/pki_helpers.go

    }
    
    // NewPrivateKey returns a new private key.
    var NewPrivateKey = GeneratePrivateKey
    
    // rsaKeySizeFromAlgorithmType takes a known RSA algorithm defined in the kubeadm API
    // an returns its key size. For unknown types it returns 0. For an empty type it returns
    // the default size of 2048.
    func rsaKeySizeFromAlgorithmType(keyType kubeadmapi.EncryptionAlgorithmType) int {
    	switch keyType {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/pkiutil/pki_helpers_test.go

    		{algorithm: kubeadmapi.EncryptionAlgorithmRSA4096, expectedSize: 4096},
    	}
    	for _, rt := range tests {
    		t.Run(string(rt.algorithm), func(t *testing.T) {
    			size := rsaKeySizeFromAlgorithmType(rt.algorithm)
    			if size != rt.expectedSize {
    				t.Errorf("expected size: %d, got: %d", rt.expectedSize, size)
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 31 21:49:21 UTC 2024
    - 22.5K bytes
    - Viewed (0)
Back to top