/**
  * Constructor for AlgorithmIdentifier.
  *
  * @param oid ObjectIdentifier
  * @param param AlgorithmParameters
  * @throws ASN1Exception
  */
 public AlgorithmIdentifier(ObjectIdentifier oid, AlgorithmParameters param) throws ASN1Exception {
   this.ident = ASN1Factory.encodeASN1Object(new Tag(Tag.OBJECTID), oid.getEncoded());
   this.ai.addComponent(this.ident);
   if (param == null) {
     try {
       this.param = new NULL();
     } catch (TLVEncodingException e) {
       throw new ASN1Exception(e);
     }
     this.ai.addComponent(this.param);
   }
 }