From 708aa28a814f8daa66b11d2efb31191f9a7f8696 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 12 Feb 2020 12:18:22 +0700 Subject: Mark some constructors obsolete (per bc-java) --- crypto/src/security/PrivateKeyFactory.cs | 6 +++--- crypto/src/security/PublicKeyFactory.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crypto/src/security') 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) -- cgit 1.4.1