Package codec.asn1

Examples of codec.asn1.ASN1OctetString


    public CertBag(java.security.cert.X509Certificate cert)
      throws java.security.cert.CertificateEncodingException {
  super(2);
  certId_ = new ASN1ObjectIdentifier("1.2.840.113549.1.9.22.1");
  add(certId_);
  x509Cert_ = new ASN1OctetString(cert.getEncoded());
  certValue_ = new ASN1TaggedType(0, x509Cert_, true);
  add(certValue_);
    }
View Full Code Here


    public CRLBag(X509Crl crl) throws java.security.cert.CRLException {
  super(2);
  crlId_ = new ASN1ObjectIdentifier("1.2.840.113549.1.9.23");
  add(crlId_);
  ASN1OctetString x509 = new ASN1OctetString(crl.getEncoded());
  crlValue_ = new ASN1TaggedType(0, x509, true);
  add(crlValue_);
    }
View Full Code Here

    public AuthorityKeyIdentifierExtension() throws Exception {
  super();
  setOID(new ASN1ObjectIdentifier(ID_CE_AUTHORITY_KEY_IDENTIFIER));
  setCritical(false);

  keyIdentifier = new ASN1OctetString();
  keyIdentifierTag = new ASN1TaggedType(KEY_IDENTIFIER_TYPE,
    keyIdentifier, false, true);
  authorityKeyIdentifier.add(keyIdentifierTag);

  certIssuer = new ASN1SequenceOf(GeneralName.class);
View Full Code Here

  critical = new ASN1Boolean(false);
  critical.setOptional(true);

  add(critical);

  extnValue = new ASN1OctetString();
  add(extnValue);
    }
View Full Code Here

      IOException {
  super(ext);
    }

    public void setKeyIdentifier(byte[] identifier) throws Exception {
  keyIdentifier = new ASN1OctetString(identifier);
  setValue(keyIdentifier);
    }
View Full Code Here

    public EncryptedContentInfo() {
  super(3);

  contentType_ = new ASN1ObjectIdentifier();
  cAlg_ = new AlgorithmIdentifier();
  econtent_ = new ASN1TaggedType(0, new ASN1OctetString(), false, true);

  add(contentType_);
  add(cAlg_);
  add(econtent_);
    }
View Full Code Here

  if (bea == null || bek == null) {
      throw new NullPointerException("BEK or BEA is null!");
  }
  contentType_ = new ASN1ObjectIdentifier(DATA_OID);
  cAlg_ = new AlgorithmIdentifier(bea, params);
  econtent_ = new ASN1TaggedType(0, new ASN1OctetString(), false, true);

  add(contentType_);
  add(cAlg_);
  add(econtent_);
View Full Code Here

     */
    public byte[] getEncryptedContent() {
  if (econtent_.isOptional()) {
      return null;
  }
  ASN1OctetString v;

  v = (ASN1OctetString) econtent_.getInnerType();
  return v.getByteArray();
    }
View Full Code Here

  b = out.toByteArray();
  out.close();

  contentType_ = new ASN1ObjectIdentifier(DATA_OID);
  econtent_ = new ASN1TaggedType(0, new ASN1OctetString(b), false, false);

  clear();
  add(contentType_);
  add(cAlg_);
  add(econtent_);
View Full Code Here

  contentType_ = oid;

  /*
   * Embed the content into this structure.
   */
  econtent_ = new ASN1TaggedType(0, new ASN1OctetString(b), false, false);

  /*
   * Re-build the structure.
   */
  clear();
 
View Full Code Here

TOP

Related Classes of codec.asn1.ASN1OctetString

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.