gpt4 book ai didi

org.bouncycastle.asn1.x9.X962Parameters.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 04:25:05 25 4
gpt4 key购买 nike

本文整理了Java中org.bouncycastle.asn1.x9.X962Parameters.<init>()方法的一些代码示例,展示了X962Parameters.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X962Parameters.<init>()方法的具体详情如下:
包路径:org.bouncycastle.asn1.x9.X962Parameters
类名称:X962Parameters
方法名:<init>

X962Parameters.<init>介绍

暂无

代码示例

代码示例来源:origin: redfish64/TinyTravelTracker

public static X962Parameters getInstance(
  Object obj)
{
  if (obj == null || obj instanceof X962Parameters) 
  {
    return (X962Parameters)obj;
  }
  
  if (obj instanceof ASN1Primitive) 
  {
    return new X962Parameters((ASN1Primitive)obj);
  }
  
  throw new IllegalArgumentException("unknown object in getInstance()");
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

public static X962Parameters getInstance(
  Object obj)
{
  if (obj == null || obj instanceof X962Parameters) 
  {
    return (X962Parameters)obj;
  }
  
  if (obj instanceof ASN1Primitive) 
  {
    return new X962Parameters((ASN1Primitive)obj);
  }
  if (obj instanceof byte[])
  {
    try
    {
      return new X962Parameters(ASN1Primitive.fromByteArray((byte[])obj));
    }
    catch (Exception e)
    {
      throw new IllegalArgumentException("unable to parse encoded data: " + e.getMessage());
    }
  }
  throw new IllegalArgumentException("unknown object in getInstance()");
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

@Override
protected byte[] engineGetEncoded(String format)
  throws IOException
{
  if (isASN1FormatString(format))
  {
    X962Parameters params;
    if (ecParameterSpec == null)     // implicitly CA
    {
      params = new X962Parameters(DERNull.INSTANCE);
    }
    else if (curveName != null)
    {
      params = new X962Parameters(ECUtil.getNamedCurveOid(curveName));
    }
    else
    {
      org.bouncycastle.jce.spec.ECParameterSpec ecSpec = EC5Util.convertSpec(ecParameterSpec, false);
      X9ECParameters ecP = new X9ECParameters(
        ecSpec.getCurve(),
        ecSpec.getG(),
        ecSpec.getN(),
        ecSpec.getH(),
        ecSpec.getSeed());
      params = new X962Parameters(ecP);
    }
    return params.getEncoded();
  }
  throw new IOException("Unknown parameters format in AlgorithmParameters object: " + format);
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

params = new X962Parameters(curveOid);
params = new X962Parameters(DERNull.INSTANCE);
  ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);

代码示例来源:origin: ZZMarquis/gmhelper

/**
 * copy from BC
 *
 * @param ecSpec
 * @param withCompression
 * @return
 */
public static X962Parameters getDomainParametersFromName(java.security.spec.ECParameterSpec ecSpec,
  boolean withCompression) {
  X962Parameters params;
  if (ecSpec instanceof ECNamedCurveSpec) {
    ASN1ObjectIdentifier curveOid = ECUtil.getNamedCurveOid(((ECNamedCurveSpec) ecSpec).getName());
    if (curveOid == null) {
      curveOid = new ASN1ObjectIdentifier(((ECNamedCurveSpec) ecSpec).getName());
    }
    params = new X962Parameters(curveOid);
  } else if (ecSpec == null) {
    params = new X962Parameters(DERNull.INSTANCE);
  } else {
    ECCurve curve = EC5Util.convertCurve(ecSpec.getCurve());
    X9ECParameters ecP = new X9ECParameters(
      curve,
      EC5Util.convertPoint(curve, ecSpec.getGenerator(), withCompression),
      ecSpec.getOrder(),
      BigInteger.valueOf(ecSpec.getCofactor()),
      ecSpec.getCurve().getSeed());
    params = new X962Parameters(ecP);
  }
  return params;
}

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

params = new X962Parameters(curveOid);
params = new X962Parameters(DERNull.INSTANCE);
  ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);

代码示例来源:origin: redfish64/TinyTravelTracker

params = new X962Parameters(DERNull.INSTANCE);      // Implicitly CA
params = new X962Parameters(((ECNamedDomainParameters)domainParams).getName());
  domainParams.getSeed());
params = new X962Parameters(ecP);

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

params = new X962Parameters(curveParams);

代码示例来源:origin: redfish64/TinyTravelTracker

params = new X962Parameters(DERNull.INSTANCE);      // Implicitly CA
params = new X962Parameters(((ECNamedDomainParameters)domainParams).getName());
orderBitLength = domainParams.getCurve().getOrder().bitLength();
  domainParams.getSeed());
params = new X962Parameters(ecP);
orderBitLength = domainParams.getCurve().getOrder().bitLength();

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

params = new X962Parameters(curveParams);

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

params = new X962Parameters(curveOid);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());
params = new X962Parameters(DERNull.INSTANCE);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, null, this.getS());
  ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

ecSpec.getCurve().getSeed());
  params = new X962Parameters(ecP);
params = new X962Parameters(curveOid);
params = new X962Parameters(DERNull.INSTANCE);
  ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

params = new X962Parameters(curveOid);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());
params = new X962Parameters(DERNull.INSTANCE);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, null, this.getS());
  ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

params = new X962Parameters(curveOid);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());
params = new X962Parameters(DERNull.INSTANCE);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, null, this.getS());
  ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);
orderBitLength = ECUtil.getOrderBitLength(BouncyCastleProvider.CONFIGURATION, ecSpec.getOrder(), this.getS());

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);

代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on

private void populateFromPrivKeyInfo(PrivateKeyInfo info)
  throws IOException
  X962Parameters params = new X962Parameters((ASN1Primitive)info.getPrivateKeyAlgorithm().getParameters());

代码示例来源:origin: redfish64/TinyTravelTracker

X962Parameters params = new X962Parameters((ASN1Primitive)algId.getParameters());

代码示例来源:origin: com.hynnet/jradius-extended

X962Parameters      params = new X962Parameters((DERObject)keyInfo.getAlgorithmId().getParameters());
ECDomainParameters  dParams = null;

25 4 0