diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2020-07-17 22:07:12 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2020-07-17 22:07:12 +0700 |
commit | 2db28a5b63aadd34fb3ef350d69eb4db4e4580b4 (patch) | |
tree | 119f0a21af644d1e5e2e2ba9ab4658f2fd69dcaf /crypto/test | |
parent | Spelling (diff) | |
download | BouncyCastle.NET-ed25519-2db28a5b63aadd34fb3ef350d69eb4db4e4580b4.tar.xz |
Straighten out ECGOST3410NamedCurves
- deprecate/replace methods returning ECDomainParameters
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/src/crypto/test/ECGOST3410_2012Test.cs | 8 | ||||
-rw-r--r-- | crypto/test/src/test/NamedCurveTest.cs | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/crypto/test/src/crypto/test/ECGOST3410_2012Test.cs b/crypto/test/src/crypto/test/ECGOST3410_2012Test.cs index 7e0a84cbe..0e7e90611 100644 --- a/crypto/test/src/crypto/test/ECGOST3410_2012Test.cs +++ b/crypto/test/src/crypto/test/ECGOST3410_2012Test.cs @@ -30,7 +30,7 @@ namespace Org.BouncyCastle.Crypto.Tests public SimpleTestResult EncodeRecodePublicKey() { DerObjectIdentifier oid = ECGost3410NamedCurves.GetOid("Tc26-Gost-3410-12-512-paramSetA"); - ECNamedDomainParameters ecp = new ECNamedDomainParameters(oid, ECGost3410NamedCurves.GetByOid(oid)); + ECNamedDomainParameters ecp = new ECNamedDomainParameters(oid, ECGost3410NamedCurves.GetByOidX9(oid)); ECGost3410Parameters gostParams = new ECGost3410Parameters(ecp, oid, RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512, null); ECKeyGenerationParameters paramameters = new ECKeyGenerationParameters(gostParams, new SecureRandom()); ECKeyPairGenerator engine = new ECKeyPairGenerator(); @@ -118,7 +118,7 @@ namespace Org.BouncyCastle.Crypto.Tests private SimpleTestResult EncodeRecodePrivateKey() { DerObjectIdentifier oid = ECGost3410NamedCurves.GetOid("Tc26-Gost-3410-12-512-paramSetA"); - ECNamedDomainParameters ecp = new ECNamedDomainParameters(oid, ECGost3410NamedCurves.GetByOid(oid)); + ECNamedDomainParameters ecp = new ECNamedDomainParameters(oid, ECGost3410NamedCurves.GetByOidX9(oid)); ECGost3410Parameters gostParams = new ECGost3410Parameters(ecp, oid, RosstandartObjectIdentifiers.id_tc26_gost_3411_12_512, null); ECKeyGenerationParameters parameters = new ECKeyGenerationParameters(gostParams, new SecureRandom()); ECKeyPairGenerator engine = new ECKeyPairGenerator(); @@ -338,7 +338,7 @@ namespace Org.BouncyCastle.Crypto.Tests public SimpleTestResult EncodeDecodePrivateLW(string oidStr, DerObjectIdentifier digest) { DerObjectIdentifier oid = ECGost3410NamedCurves.GetOid(oidStr); - ECNamedDomainParameters ecp = new ECNamedDomainParameters(oid, ECGost3410NamedCurves.GetByOid(oid)); + ECNamedDomainParameters ecp = new ECNamedDomainParameters(oid, ECGost3410NamedCurves.GetByOidX9(oid)); ECGost3410Parameters gostParams = new ECGost3410Parameters(ecp, oid, digest, null); ECKeyGenerationParameters parameters = new ECKeyGenerationParameters(gostParams, new SecureRandom()); ECKeyPairGenerator engine = new ECKeyPairGenerator(); @@ -421,7 +421,7 @@ namespace Org.BouncyCastle.Crypto.Tests public SimpleTestResult EncodeDecodePublicLW(string oidStr, DerObjectIdentifier digest) { DerObjectIdentifier oid = ECGost3410NamedCurves.GetOid(oidStr); - ECNamedDomainParameters ecp = new ECNamedDomainParameters(oid, ECGost3410NamedCurves.GetByOid(oid)); + ECNamedDomainParameters ecp = new ECNamedDomainParameters(oid, ECGost3410NamedCurves.GetByOidX9(oid)); ECGost3410Parameters gostParams = new ECGost3410Parameters(ecp, oid, digest, null); ECKeyGenerationParameters parameters = new ECKeyGenerationParameters(gostParams, new SecureRandom()); ECKeyPairGenerator engine = new ECKeyPairGenerator(); diff --git a/crypto/test/src/test/NamedCurveTest.cs b/crypto/test/src/test/NamedCurveTest.cs index 5dec49c41..560af7563 100644 --- a/crypto/test/src/test/NamedCurveTest.cs +++ b/crypto/test/src/test/NamedCurveTest.cs @@ -41,11 +41,6 @@ namespace Org.BouncyCastle.Tests private static ECDomainParameters GetCurveParameters( string name) { - ECDomainParameters ecdp = ECGost3410NamedCurves.GetByName(name); - - if (ecdp != null) - return ecdp; - X9ECParameters ecP = ECNamedCurveTable.GetByName(name); if (ecP == null) |