if (obj== null || obj instanceof AlgorithmIdentifier)
{
return (AlgorithmIdentifier)obj;
}
if (obj instanceof DERObjectIdentifier)
{
return new AlgorithmIdentifier((DERObjectIdentifier)obj);
}
if (obj instanceof String)
{
return new AlgorithmIdentifier((String)obj);
}
if (obj instanceof ASN1Sequence)
{
return new AlgorithmIdentifier((ASN1Sequence)obj);
}
throw new IllegalArgumentException("unknown object in factory");