org.mozilla.jss.pkix.primitive

Class AlgorithmIdentifier

Implemented Interfaces:
ASN1Value

public class AlgorithmIdentifier
extends java.lang.Object
implements ASN1Value

Nested Class Summary

static class
AlgorithmIdentifier.Template

Field Summary

static Tag
TAG

Constructor Summary

AlgorithmIdentifier(OBJECT_IDENTIFIER oid)
Creates an AlgorithmIdentifier with no parameter.
AlgorithmIdentifier(OBJECT_IDENTIFIER oid, ASN1Value parameters)
Creates an AlgorithmIdentifier.

Method Summary

void
encode(OutputStream ostream)
void
encode(Tag implicit, OutputStream ostream)
OBJECT_IDENTIFIER
getOID()
ASN1Value
getParameters()
If this instance was constructed, returns the parameter passed in to the constructer.
Tag
getTag()
static AlgorithmIdentifier.Template
getTemplate()

Field Details

TAG

public static final Tag TAG

Constructor Details

AlgorithmIdentifier

public AlgorithmIdentifier(OBJECT_IDENTIFIER oid)
Creates an AlgorithmIdentifier with no parameter.

AlgorithmIdentifier

public AlgorithmIdentifier(OBJECT_IDENTIFIER oid,
                           ASN1Value parameters)
Creates an AlgorithmIdentifier.
Parameters:
parameters - The algorithm parameters. A value of null will be encoded with an ASN.1 NULL.

Method Details

encode

public void encode(OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicit,
                   OutputStream ostream)
            throws IOException
Specified by:
encode in interface ASN1Value

getOID

public OBJECT_IDENTIFIER getOID()

getParameters

public ASN1Value getParameters()
If this instance was constructed, returns the parameter passed in to the constructer. If this instance was decoded from a template, returns an ANY that was read from the BER stream. In either case, it will return null if no parameters were supplied.

getTag

public Tag getTag()
Specified by:
getTag in interface ASN1Value

getTemplate

public static AlgorithmIdentifier.Template getTemplate()