public static AsymmetricCipherKeyPair GetDsaKeyPair( DSAParameters dp) { DsaValidationParameters validationParameters = (dp.Seed != null) ? new DsaValidationParameters(dp.Seed, dp.Counter) : null; DsaParameters parameters = new DsaParameters( new BigInteger(1, dp.P), new BigInteger(1, dp.Q), new BigInteger(1, dp.G), validationParameters); DsaPublicKeyParameters pubKey = new DsaPublicKeyParameters( new BigInteger(1, dp.Y), parameters); DsaPrivateKeyParameters privKey = new DsaPrivateKeyParameters( new BigInteger(1, dp.X), parameters); return new AsymmetricCipherKeyPair(pubKey, privKey); }
protected bool Equals( DsaPrivateKeyParameters other) { return x.Equals(other.x) && base.Equals(other); }