Package codec.asn1

Examples of codec.asn1.ASN1IA5String


  add(mac_);

  macSalt_ = new ASN1OctetString(salt);
  add(macSalt_);

  iter_ = new ASN1Integer(it);
  if (it == 1) // default value?
      iter_.setOptional(true);
  add(iter_);
    }
View Full Code Here


  if (oid == null) {
      throw new NullPointerException("Need an OID!");
  }
  if (value == null) {
      value = new ASN1Null();
  }
  type_ = oid;
  values_ = new ASN1Set(1);

  values_.add(value);
View Full Code Here

  Attribute attrUserFn = null;
  Attribute attrUserKeyId = null;

  // Add friendlyName (if present)
  if ((user_fn != null) && !user_fn.equals("")) {
      ASN1ObjectIdentifier fnOID = new ASN1ObjectIdentifier(FN_OID_);
      attrUserFn = new Attribute(fnOID, new ASN1BMPString(user_fn));
  }

  // add localKeyId (if present)
  if ((lk_id != null) && (lk_id.length > 0)) {
      ASN1ObjectIdentifier lkOID = new ASN1ObjectIdentifier(LK_OID_);
      attrUserKeyId = new Attribute(lkOID, new ASN1OctetString(lk_id));
  }

  // both present -> add both
  if ((user_fn != null) && (lk_id != null)) {
View Full Code Here

     * A SafeContents can be put recursively into a SafeBag.
     *
     * @return the OID defining this structure as a SafeContents bag.
     */
    public ASN1ObjectIdentifier getOID() {
  return new ASN1ObjectIdentifier(OID_);
    }
View Full Code Here

     * is used for this.
     */
    public Attribute() {
  super(2);

  type_ = new ASN1ObjectIdentifier();
  values_ = new ASN1SetOf(ASN1OpenType.class);

  add(type_);
  add(values_);
    }
View Full Code Here

  super(2);

  if (registry == null) {
      registry = OIDRegistry.getGlobalOIDRegistry();
  }
  type_ = new ASN1ObjectIdentifier();
  values_ = new ASN1SetOf(new DefinedByResolver(registry, type_));

  add(type_);
  add(values_);
    }
View Full Code Here

  try {
      reg = PKCS12OIDRegistry.getDefaultRegistry();

      for (n = 0; n < argv.length; n++) {
    System.out.println(reg.getASN1Type(new ASN1ObjectIdentifier(
      argv[n])));
      }
  } catch (Exception e) {
      e.printStackTrace(System.err);
  }
View Full Code Here

     * A SafeContents can be put recursively into a SafeBag.
     *
     * @return the OID defining this structure as a SafeContents bag.
     */
    public ASN1ObjectIdentifier getOID() {
  return new ASN1ObjectIdentifier(OID_);
    }
View Full Code Here

  try {
      reg = PKCSRegistry.getDefaultRegistry();

      for (n = 0; n < argv.length; n++) {
    System.out.println(reg.getASN1Type(new ASN1ObjectIdentifier(
      argv[n])));
      }
  } catch (Exception e) {
      e.printStackTrace(System.err);
  }
View Full Code Here

     *
     * @return true if oid is a valid codec.asn1.ASN1ObjectIdentifier
     */
    public static boolean isObjectIdentifier(String oid)
    {
        ASN1ObjectIdentifier aSN1ObjectIdentifier = null;
        try
        {
            aSN1ObjectIdentifier = new ASN1ObjectIdentifier(oid);
        }
        catch (Exception e)
        {
            return false;
        }
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1IA5String

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.