System.Security.Cryptography.RSACryptoServiceProvider.RSACryptoServiceProvider C# (CSharp) Method

RSACryptoServiceProvider() private method

private RSACryptoServiceProvider ( int keySize, CspParameters parameters, bool useDefaultKeySize ) : System.Diagnostics
keySize int
parameters CspParameters
useDefaultKeySize bool
return System.Diagnostics
        private RSACryptoServiceProvider(int keySize, CspParameters parameters, bool useDefaultKeySize)
        {
            if (keySize < 0)
            {
                throw new ArgumentOutOfRangeException("dwKeySize", "ArgumentOutOfRange_NeedNonNegNum");
            }

            _parameters = CapiHelper.SaveCspParameters(
                CapiHelper.CspAlgorithmType.Rsa,
                parameters,
                s_useMachineKeyStore,
                out _randomKeyContainer);

            _keySize = useDefaultKeySize ? 1024 : keySize;

            // If this is not a random container we generate, create it eagerly 
            // in the constructor so we can report any errors now.
            if (!_randomKeyContainer)
            {
                // Force-read the SafeKeyHandle property, which will summon it into existence.
                SafeKeyHandle localHandle = SafeKeyHandle;
                Debug.Assert(localHandle != null);
            }
        }

Same methods

RSACryptoServiceProvider::RSACryptoServiceProvider ( ) : System.Diagnostics
RSACryptoServiceProvider::RSACryptoServiceProvider ( CspParameters parameters ) : System.Diagnostics
RSACryptoServiceProvider::RSACryptoServiceProvider ( int dwKeySize ) : System.Diagnostics
RSACryptoServiceProvider::RSACryptoServiceProvider ( int dwKeySize, CspParameters parameters ) : System.Diagnostics