FileDocCategorySizeDatePackage
BiometricData.javaAPI DocAndroid 1.5 API3545Wed May 06 22:41:06 BST 2009org.bouncycastle.asn1.x509.qualified

BiometricData

public class BiometricData extends org.bouncycastle.asn1.ASN1Encodable
The BiometricData object.
BiometricData ::= SEQUENCE {
typeOfBiometricData TypeOfBiometricData,
hashAlgorithm AlgorithmIdentifier,
biometricDataHash OCTET STRING,
sourceDataUri IA5String OPTIONAL }

Fields Summary
TypeOfBiometricData
typeOfBiometricData
org.bouncycastle.asn1.x509.AlgorithmIdentifier
hashAlgorithm
org.bouncycastle.asn1.ASN1OctetString
biometricDataHash
org.bouncycastle.asn1.DERIA5String
sourceDataUri
Constructors Summary
public BiometricData(org.bouncycastle.asn1.ASN1Sequence seq)

        Enumeration e = seq.getObjects();

        // typeOfBiometricData
        typeOfBiometricData = TypeOfBiometricData.getInstance(e.nextElement());
        // hashAlgorithm
        hashAlgorithm = AlgorithmIdentifier.getInstance(e.nextElement());
        // biometricDataHash
        biometricDataHash = ASN1OctetString.getInstance(e.nextElement());
        // sourceDataUri
        if (e.hasMoreElements())
        {
            sourceDataUri = DERIA5String.getInstance(e.nextElement());
        }
    
public BiometricData(TypeOfBiometricData typeOfBiometricData, org.bouncycastle.asn1.x509.AlgorithmIdentifier hashAlgorithm, org.bouncycastle.asn1.ASN1OctetString biometricDataHash, org.bouncycastle.asn1.DERIA5String sourceDataUri)

        this.typeOfBiometricData = typeOfBiometricData;
        this.hashAlgorithm = hashAlgorithm;
        this.biometricDataHash = biometricDataHash;
        this.sourceDataUri = sourceDataUri;
    
public BiometricData(TypeOfBiometricData typeOfBiometricData, org.bouncycastle.asn1.x509.AlgorithmIdentifier hashAlgorithm, org.bouncycastle.asn1.ASN1OctetString biometricDataHash)

        this.typeOfBiometricData = typeOfBiometricData;
        this.hashAlgorithm = hashAlgorithm;
        this.biometricDataHash = biometricDataHash;
        this.sourceDataUri = null;
    
Methods Summary
public org.bouncycastle.asn1.ASN1OctetStringgetBiometricDataHash()

        return biometricDataHash;
    
public org.bouncycastle.asn1.x509.AlgorithmIdentifiergetHashAlgorithm()

        return hashAlgorithm;
    
public static org.bouncycastle.asn1.x509.qualified.BiometricDatagetInstance(java.lang.Object obj)

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

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

        return sourceDataUri;
    
public TypeOfBiometricDatagetTypeOfBiometricData()

        return typeOfBiometricData;
    
public org.bouncycastle.asn1.DERObjecttoASN1Object()

        ASN1EncodableVector seq = new ASN1EncodableVector();
        seq.add(typeOfBiometricData);
        seq.add(hashAlgorithm);
        seq.add(biometricDataHash); 
        
        if (sourceDataUri != null)
        {
            seq.add(sourceDataUri);
        }

        return new DERSequence(seq);