示例#1
0
 /// <summary>
 /// Creates a new ECPrivateKeySpec with the specified
 /// parameter values. </summary>
 /// <param name="s"> the private value. </param>
 /// <param name="params"> the associated elliptic curve domain
 /// parameters. </param>
 /// <exception cref="NullPointerException"> if {@code s}
 /// or {@code params} is null. </exception>
 public ECPrivateKeySpec(System.Numerics.BigInteger s, ECParameterSpec @params)
 {
     if (s == null)
     {
         throw new NullPointerException("s is null");
     }
     if (@params == null)
     {
         throw new NullPointerException("params is null");
     }
     this.s       = s;
     this.@params = @params;
 }
示例#2
0
 /// <summary>
 /// Creates a new ECPublicKeySpec with the specified
 /// parameter values. </summary>
 /// <param name="w"> the public point. </param>
 /// <param name="params"> the associated elliptic curve domain
 /// parameters. </param>
 /// <exception cref="NullPointerException"> if {@code w}
 /// or {@code params} is null. </exception>
 /// <exception cref="IllegalArgumentException"> if {@code w}
 /// is point at infinity, i.e. ECPoint.POINT_INFINITY </exception>
 public ECPublicKeySpec(ECPoint w, ECParameterSpec @params)
 {
     if (w == null)
     {
         throw new NullPointerException("w is null");
     }
     if (@params == null)
     {
         throw new NullPointerException("params is null");
     }
     if (w == ECPoint.POINT_INFINITY)
     {
         throw new IllegalArgumentException("w is ECPoint.POINT_INFINITY");
     }
     this.w       = w;
     this.@params = @params;
 }