private SetKey ( Microsoft.Win32.SafeHandles.SafeDsaHandle newKey ) : void | ||
newKey | Microsoft.Win32.SafeHandles.SafeDsaHandle | |
return | void |
private void SetKey(SafeDsaHandle newKey)
{
// Use ForceSet instead of the property setter to ensure that LegalKeySizes doesn't interfere
// with the already loaded key.
ForceSetKeySize(BitsPerByte * Interop.Crypto.DsaKeySize(newKey));
_key = new Lazy<SafeDsaHandle>(() => newKey, isThreadSafe:true);
// Have Lazy<T> consider the key to be loaded
var dummy = _key.Value;
}