Package codec.asn1

Examples of codec.asn1.ASN1OctetString


    public EncryptedPrivateKeyInfo() {
  super(2);

  algorithm_ = new AlgorithmIdentifier();
  add(algorithm_);
  encryptedData_ = new ASN1OctetString();
  add(encryptedData_);
    }
View Full Code Here


  clear();

  algorithm_ = new AlgorithmIdentifier(algorithm, params);
  add(algorithm_);
  encryptedData_ = new ASN1OctetString(code);
  add(encryptedData_);
    }
View Full Code Here

  }

  // 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)) {
      Attribute[] attr = new Attribute[2];
View Full Code Here

  add(version_);

  algorithm_ = new AlgorithmIdentifier();
  add(algorithm_);

  encodedKey_ = new ASN1OctetString();
  add(encodedKey_);

  attributes_ = new ASN1SetOf(Attribute.class);
  add(new ASN1TaggedType(0, attributes_, false, true));
    }
View Full Code Here

  add(version_);

  algorithm_ = aid;
  add(algorithm_);

  encodedKey_ = new ASN1OctetString(key);
  add(encodedKey_);

  attributes_ = new ASN1Set();
  add(new ASN1TaggedType(0, attributes_, false, true));
    }
View Full Code Here

  } catch (IOException e) {
      throw new InconsistentStateException("Caught IOException!");
  } catch (ASN1Exception e) {
      throw new InconsistentStateException("Caught ASN1Exception!");
  }
  encodedKey_ = new ASN1OctetString(code);
  add(encodedKey_);

  attributes_ = new ASN1Set();
  add(new ASN1TaggedType(0, attributes_, false, true));
    }
View Full Code Here

  add(version_);

  algorithm_ = new AlgorithmIdentifier();
  add(algorithm_);

  encodedKey_ = new ASN1OctetString();
  add(encodedKey_);

  attributes_ = new ASN1SetOf(Attribute.class);
  add(new ASN1TaggedType(0, attributes_, false, true));
View Full Code Here

  try {
      bos = new ByteArrayOutputStream();
      enc = new DEREncoder(bos);
      key.encode(enc);
      encodedKey_ = new ASN1OctetString(bos.toByteArray());
      enc.close();
      set(2, encodedKey_);
  } catch (ASN1Exception e) {
      throw new InconsistentStateException("Internal, encoding error!");
  } catch (IOException e) {
View Full Code Here

  super(3);

  mac_ = new DigestInfo();
  add(mac_);

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

  iter_ = new ASN1Integer();
  iter_.setOptional(true);
  add(iter_);
View Full Code Here

  super(3);

  mac_ = digest;
  add(mac_);

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

  iter_ = new ASN1Integer(it);
  if (it == 1) // default value?
      iter_.setOptional(true);
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.