summary refs log tree commit diff
path: root/crypto/src/security
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2020-02-12 12:18:22 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2020-02-12 12:18:22 +0700
commit708aa28a814f8daa66b11d2efb31191f9a7f8696 (patch)
tree412acaa9d26552ac6ee19bc97058465ff8ca52c0 /crypto/src/security
parentEdDSA: guard against pub key mismatch (diff)
downloadBouncyCastle.NET-ed25519-708aa28a814f8daa66b11d2efb31191f9a7f8696.tar.xz
Mark some constructors obsolete (per bc-java)
Diffstat (limited to 'crypto/src/security')
-rw-r--r--crypto/src/security/PrivateKeyFactory.cs6
-rw-r--r--crypto/src/security/PublicKeyFactory.cs2
2 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/security/PrivateKeyFactory.cs b/crypto/src/security/PrivateKeyFactory.cs
index ddcb88992..b72ece365 100644
--- a/crypto/src/security/PrivateKeyFactory.cs
+++ b/crypto/src/security/PrivateKeyFactory.cs
@@ -107,7 +107,7 @@ namespace Org.BouncyCastle.Security
             }
             else if (algOid.Equals(X9ObjectIdentifiers.IdECPublicKey))
             {
-                X962Parameters para = new X962Parameters(algID.Parameters.ToAsn1Object());
+                X962Parameters para = X962Parameters.GetInstance(algID.Parameters.ToAsn1Object());
 
                 X9ECParameters x9;
                 if (para.IsNamedCurve)
@@ -132,8 +132,8 @@ namespace Org.BouncyCastle.Security
             }
             else if (algOid.Equals(CryptoProObjectIdentifiers.GostR3410x2001))
             {
-                Gost3410PublicKeyAlgParameters gostParams = new Gost3410PublicKeyAlgParameters(
-                    Asn1Sequence.GetInstance(algID.Parameters.ToAsn1Object()));
+                Gost3410PublicKeyAlgParameters gostParams = Gost3410PublicKeyAlgParameters.GetInstance(
+                    algID.Parameters.ToAsn1Object());
 
                 ECDomainParameters ecP = ECGost3410NamedCurves.GetByOid(gostParams.PublicKeyParamSet);
 
diff --git a/crypto/src/security/PublicKeyFactory.cs b/crypto/src/security/PublicKeyFactory.cs
index 7b19f1c0f..6813452a6 100644
--- a/crypto/src/security/PublicKeyFactory.cs
+++ b/crypto/src/security/PublicKeyFactory.cs
@@ -133,7 +133,7 @@ namespace Org.BouncyCastle.Security
             }
             else if (algOid.Equals(X9ObjectIdentifiers.IdECPublicKey))
             {
-                X962Parameters para = new X962Parameters(algID.Parameters.ToAsn1Object());
+                X962Parameters para = X962Parameters.GetInstance(algID.Parameters.ToAsn1Object());
 
                 X9ECParameters x9;
                 if (para.IsNamedCurve)