/** * basic constructor. * * @param publicParam a public key parameters object. * @param privateParam the corresponding private key parameters. */ public AsymmetricCipherKeyPair( AsymmetricKeyParameter publicParameter, AsymmetricKeyParameter privateParameter) { if (publicParameter.IsPrivate) throw new ArgumentException("Expected a public key", "publicParameter"); if (!privateParameter.IsPrivate) throw new ArgumentException("Expected a private key", "privateParameter"); this.publicParameter = publicParameter; this.privateParameter = privateParameter; }
protected bool Equals( AsymmetricKeyParameter other) { return privateKey == other.privateKey; }