FileDocCategorySizeDatePackage
DataGroupHash.javaAPI DocAndroid 1.5 API2698Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.icao

DataGroupHash

public class DataGroupHash extends org.bouncycastle.asn1.ASN1Encodable
The DataGroupHash object.
DataGroupHash ::= SEQUENCE {
dataGroupNumber DataGroupNumber,
dataGroupHashValue OCTET STRING }

DataGroupNumber ::= INTEGER {
dataGroup1 (1),
dataGroup1 (2),
dataGroup1 (3),
dataGroup1 (4),
dataGroup1 (5),
dataGroup1 (6),
dataGroup1 (7),
dataGroup1 (8),
dataGroup1 (9),
dataGroup1 (10),
dataGroup1 (11),
dataGroup1 (12),
dataGroup1 (13),
dataGroup1 (14),
dataGroup1 (15),
dataGroup1 (16) }

Fields Summary
org.bouncycastle.asn1.DERInteger
dataGroupNumber
org.bouncycastle.asn1.ASN1OctetString
dataGroupHashValue
Constructors Summary
public DataGroupHash(org.bouncycastle.asn1.ASN1Sequence seq)

        Enumeration e = seq.getObjects();

        // dataGroupNumber
        dataGroupNumber = DERInteger.getInstance(e.nextElement());
        // dataGroupHashValue
        dataGroupHashValue = ASN1OctetString.getInstance(e.nextElement());   
    
public DataGroupHash(int dataGroupNumber, org.bouncycastle.asn1.ASN1OctetString dataGroupHashValue)

        this.dataGroupNumber = new DERInteger(dataGroupNumber);
        this.dataGroupHashValue = dataGroupHashValue; 
    
Methods Summary
public org.bouncycastle.asn1.ASN1OctetStringgetDataGroupHashValue()

        return dataGroupHashValue;
    
public intgetDataGroupNumber()

        return dataGroupNumber.getValue().intValue();
    
public static org.bouncycastle.asn1.icao.DataGroupHashgetInstance(java.lang.Object obj)

        if (obj == null || obj instanceof DataGroupHash)
        {
            return (DataGroupHash)obj;
        }

        if (obj instanceof ASN1Sequence)
        {
            return new DataGroupHash(ASN1Sequence.getInstance(obj));            
        }
        else
        {
            throw new IllegalArgumentException("unknown object in getInstance");
        }
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()

        ASN1EncodableVector seq = new ASN1EncodableVector();
        seq.add(dataGroupNumber);
        seq.add(dataGroupHashValue);  

        return new DERSequence(seq);