コード例 #1
0
 public ECKeyGenerationParameters(
     DerObjectIdentifier publicKeyParamSet,
     SecureRandom random)
     : this(ECKeyParameters.LookupParameters(publicKeyParamSet), random)
 {
     this.publicKeyParamSet = publicKeyParamSet;
 }
コード例 #2
0
		public void Init(
			bool				forSigning,
			ICipherParameters	parameters)
		{
			if (forSigning)
			{
				if (parameters is ParametersWithRandom)
				{
					ParametersWithRandom rParam = (ParametersWithRandom)parameters;

					this.random = rParam.Random;
					parameters = rParam.Parameters;
				}
				else
				{
					this.random = new SecureRandom();
				}

				if (!(parameters is ECPrivateKeyParameters))
					throw new InvalidKeyException("EC private key required for signing");

				this.key = (ECPrivateKeyParameters) parameters;
			}
			else
			{
				if (!(parameters is ECPublicKeyParameters))
					throw new InvalidKeyException("EC public key required for verification");

				this.key = (ECPublicKeyParameters)parameters;
			}
		}
コード例 #3
0
		protected bool Equals(
			ECKeyParameters other)
		{
			return parameters.Equals(other.parameters) && base.Equals(other);
		}
コード例 #4
0
ファイル: ECKeyParameters.cs プロジェクト: mjsir911/Disa-XMPP
 protected bool Equals(
     ECKeyParameters other)
 {
     return(parameters.Equals(other.parameters) && base.Equals(other));
 }