示例#1
0
  org.sandrob.bouncycastle.jce.spec.ECParameterSpec engineGetSpec() {
    if (ecSpec != null) {
      return EC5Util.convertSpec(ecSpec, withCompression);
    }

    return ProviderUtil.getEcImplicitlyCa();
  }
示例#2
0
  public org.sandrob.bouncycastle.jce.spec.ECParameterSpec getParameters() {
    if (ecSpec == null) {
      return null;
    }

    return EC5Util.convertSpec(ecSpec, withCompression);
  }
示例#3
0
  public JCEECPrivateKey(
      String algorithm, org.sandrob.bouncycastle.jce.spec.ECPrivateKeySpec spec) {
    this.algorithm = algorithm;
    this.d = spec.getD();

    if (spec.getParams() != null) // can be null if implicitlyCA
    {
      ECCurve curve = spec.getParams().getCurve();
      EllipticCurve ellipticCurve;

      ellipticCurve = EC5Util.convertCurve(curve, spec.getParams().getSeed());

      this.ecSpec = EC5Util.convertSpec(ellipticCurve, spec.getParams());
    } else {
      this.ecSpec = null;
    }
  }