summary refs log tree commit diff
path: root/crypto/src/security/PrivateKeyFactory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/security/PrivateKeyFactory.cs')
-rw-r--r--crypto/src/security/PrivateKeyFactory.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/src/security/PrivateKeyFactory.cs b/crypto/src/security/PrivateKeyFactory.cs
index cf47eb272..670cebd7f 100644
--- a/crypto/src/security/PrivateKeyFactory.cs
+++ b/crypto/src/security/PrivateKeyFactory.cs
@@ -78,8 +78,7 @@ namespace Org.BouncyCastle.Security
             }
             else if (algOid.Equals(OiwObjectIdentifiers.ElGamalAlgorithm))
             {
-                ElGamalParameter para = new ElGamalParameter(
-                    Asn1Sequence.GetInstance(algID.Parameters.ToAsn1Object()));
+                ElGamalParameter para = ElGamalParameter.GetInstance(algID.Parameters);
                 DerInteger derX = (DerInteger)keyInfo.ParsePrivateKey();
 
                 return new ElGamalPrivateKeyParameters(