JCEDHPublicKey(
SubjectPublicKeyInfo info)
{
this.info = info;
DERInteger derY;
try
{
derY = (DERInteger)info.parsePublicKey();
}
catch (IOException e)
{
throw new IllegalArgumentException("invalid info structure in DH public key");
}
this.y = derY.getValue();
ASN1Sequence seq = ASN1Sequence.getInstance(info.getAlgorithmId().getParameters());
DERObjectIdentifier id = info.getAlgorithmId().getAlgorithm();
// we need the PKCS check to handle older keys marked with the X9 oid.