private SafeDsaHandle GenerateKey() { SafeDsaHandle key; if (!Interop.Crypto.DsaGenerateKey(out key, KeySize)) { throw Interop.Crypto.CreateOpenSslCryptographicException(); } return key; }