[System.Security.SecurityCritical] // auto-generated private void GetKeyPair() { if (_safeKeyHandle == null) { lock (this) { if (_safeKeyHandle == null) { Utils.GetKeyPairHelper(CspAlgorithmType.Dss, _parameters, _randomKeyContainer, _dwKeySize, ref _safeProvHandle, ref _safeKeyHandle); } } } }
private void GetKeyPair() { if (this._safeKeyHandle != null) { return; } lock (this) { if (this._safeKeyHandle != null) { return; } Utils.GetKeyPairHelper(CspAlgorithmType.Rsa, this._parameters, this._randomKeyContainer, this._dwKeySize, ref this._safeProvHandle, ref this._safeKeyHandle); } }
[System.Security.SecurityCritical] // auto-generated private void GetKeyPair() { if (_safeKeyHandle == null) { lock (this) { if (_safeKeyHandle == null) { // We only attempt to generate a random key on desktop runtimes because the CoreCLR // RSA surface area is limited to simply verifying signatures. Since generating a // random key to verify signatures will always lead to failure (unless we happend to // win the lottery and randomly generate the signing key ...), there is no need // to add this functionality to CoreCLR at this point. Utils.GetKeyPairHelper(CspAlgorithmType.Rsa, _parameters, _randomKeyContainer, _dwKeySize, ref _safeProvHandle, ref _safeKeyHandle); } } } }