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

org.bouncycastle.asn1.bc.ObjectDataSequence Maven / Gradle / Ivy

Go to download

The FIPS 140-3 Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms certified to FIPS 140-3 level 1. This jar contains JCE provider and low-level API for the BC-FJA version 2.0.0, FIPS Certificate #4743. Please see certificate for certified platform details.

There is a newer version: 2.0.0
Show newest version
/***************************************************************/
/******    DO NOT EDIT THIS CLASS bc-java SOURCE FILE     ******/
/***************************************************************/
package org.bouncycastle.asn1.bc;

import java.util.Iterator;

import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.util.Arrays;

/**
 * 
 * ObjectDataSequence ::= SEQUENCE OF ObjectData
 * 
*/ public class ObjectDataSequence extends ASN1Object implements org.bouncycastle.util.Iterable { private final ASN1Encodable[] dataSequence; public ObjectDataSequence(ObjectData[] dataSequence) { this.dataSequence = new ASN1Encodable[dataSequence.length]; System.arraycopy(dataSequence, 0, this.dataSequence, 0, dataSequence.length); } private ObjectDataSequence(ASN1Sequence seq) { dataSequence = new ASN1Encodable[seq.size()]; for (int i = 0; i != dataSequence.length; i++) { dataSequence[i] = ObjectData.getInstance(seq.getObjectAt(i)); } } public static ObjectDataSequence getInstance( Object obj) { if (obj instanceof ObjectDataSequence) { return (ObjectDataSequence)obj; } else if (obj != null) { return new ObjectDataSequence(ASN1Sequence.getInstance(obj)); } return null; } public ASN1Primitive toASN1Primitive() { return new DERSequence(dataSequence); } public Iterator iterator() { return new Arrays.Iterator(dataSequence); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy