All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.spongycastle.asn1.esf.CrlListID Maven / Gradle / Ivy

Go to download

Spongy Castle is a package-rename (org.bouncycastle.* to org.spongycastle.*) of Bouncy Castle intended for Android. Android ships with a stripped-down version of Bouncy Castle - this causes classloader collisions if you try to add an alternative (updated/complete) Bouncy Castle jar. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5.

There is a newer version: 1.46.99.3-UNOFFICIAL-ROBERTO-RELEASE
Show newest version
package org.spongycastle.asn1.esf;

import java.util.Enumeration;

import org.spongycastle.asn1.ASN1Encodable;
import org.spongycastle.asn1.ASN1Sequence;
import org.spongycastle.asn1.DERObject;
import org.spongycastle.asn1.DERSequence;

/**
 * 
 * CRLListID ::= SEQUENCE {
 *     crls SEQUENCE OF CrlValidatedID }
 * 
*/ public class CrlListID extends ASN1Encodable { private ASN1Sequence crls; public static CrlListID getInstance(Object obj) { if (obj instanceof CrlListID) { return (CrlListID)obj; } else if (obj != null) { return new CrlListID(ASN1Sequence.getInstance(obj)); } throw new IllegalArgumentException("null value in getInstance"); } private CrlListID(ASN1Sequence seq) { this.crls = (ASN1Sequence)seq.getObjectAt(0); Enumeration e = this.crls.getObjects(); while (e.hasMoreElements()) { CrlValidatedID.getInstance(e.nextElement()); } } public CrlListID(CrlValidatedID[] crls) { this.crls = new DERSequence(crls); } public CrlValidatedID[] getCrls() { CrlValidatedID[] result = new CrlValidatedID[this.crls.size()]; for (int idx = 0; idx < result.length; idx++) { result[idx] = CrlValidatedID .getInstance(this.crls.getObjectAt(idx)); } return result; } public DERObject toASN1Object() { return new DERSequence(this.crls); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy