ecSpec.getCurve().getSeed());
params = new X962Parameters(ecP);
}
PrivateKeyInfo info;
ECPrivateKeyStructure keyStructure;
if (publicKey != null)
{
keyStructure = new ECPrivateKeyStructure(this.getS(), publicKey, params);
}
else
{
keyStructure = new ECPrivateKeyStructure(this.getS(), params);
}
if (algorithm.equals("ECGOST3410"))
{
info = new PrivateKeyInfo(new AlgorithmIdentifier(CryptoProObjectIdentifiers.gostR3410_2001, params.getDERObject()), keyStructure.getDERObject());
}
else
{
info = new PrivateKeyInfo(new AlgorithmIdentifier(X9ObjectIdentifiers.id_ecPublicKey, params.getDERObject()), keyStructure.getDERObject());
}
return info.getDEREncoded();
}