152153154155156157158159160161
if (registry == null) { registry = OIDRegistry.getGlobalOIDRegistry(); } type_ = new ASN1ObjectIdentifier(); values_ = new ASN1SetOf(new DefinedByResolver(registry, type_)); add(type_); add(values_); }
189190191192193194195196
add(algorithm_); encodedKey_ = new ASN1OctetString(); add(encodedKey_); attributes_ = new ASN1SetOf(Attribute.class); add(new ASN1TaggedType(0, attributes_, false, true)); }
363364365366367368369370371372373
add(algorithm_); encodedKey_ = new ASN1OctetString(); add(encodedKey_); attributes_ = new ASN1SetOf(Attribute.class); add(new ASN1TaggedType(0, attributes_, false, true)); try { dec = new DERDecoder(new ByteArrayInputStream(key.getEncoded()));
190191192193194195196
encodedKey_ = new ASN1OctetString(); add(encodedKey_); attributes_ = new ASN1SetOf(Attribute.class); add(new ASN1TaggedType(0, attributes_, false, true)); }
221222223224225226227
encodedKey_ = new ASN1OctetString(key); add(encodedKey_); attributes_ = new ASN1Set(); add(new ASN1TaggedType(0, attributes_, false, true)); }
264265266267268269270
} encodedKey_ = new ASN1OctetString(code); add(encodedKey_); attributes_ = new ASN1Set(); add(new ASN1TaggedType(0, attributes_, false, true)); }
364365366367368369370371372373374
encodedKey_ = new ASN1OctetString(); add(encodedKey_); attributes_ = new ASN1SetOf(Attribute.class); add(new ASN1TaggedType(0, attributes_, false, true)); try { dec = new DERDecoder(new ByteArrayInputStream(key.getEncoded())); decode(dec);
281282283284285286287288289290291
if (!(values_ instanceof ASN1SetOf)) { return; } ArrayList list; ASN1Type o; Iterator i; try { list = new ArrayList(values_.size());
501502503504505506507508509510511
* * @return The raw key decoded according to DER. */ public ASN1Type getDecodedRawKey() throws CorruptedCodeException { DERDecoder dec; ASN1Type raw; try { dec = new DERDecoder(new ByteArrayInputStream(encodedKey_ .getByteArray()));
315316317318319320321322323324
.println("This bag is either password or public-key protected."); return null; } bais = new ByteArrayInputStream(encodedData); SafeContents safe = new SafeContents(); BERDecoder decoder = new BERDecoder(bais); safe.decode(decoder); bais.close(); return safe; }