Package org.mozilla.jss.pkix.primitive
Class AlgorithmIdentifier
java.lang.Object
org.mozilla.jss.pkix.primitive.AlgorithmIdentifier
- All Implemented Interfaces:
ASN1Value
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate OBJECT_IDENTIFIER
private ASN1Value
private SEQUENCE
static final Tag
private static final AlgorithmIdentifier.Template
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an AlgorithmIdentifier with no parameter.AlgorithmIdentifier
(OBJECT_IDENTIFIER oid, ASN1Value parameters) Creates an AlgorithmIdentifier. -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(OutputStream ostream) Write this value's DER encoding to an output stream using its own base tag.void
encode
(Tag implicit, OutputStream ostream) Write this value's DER encoding to an output stream using an implicit tag.getOID()
If this instance was constructed, returns the parameter passed in to the constructor.getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static AlgorithmIdentifier.Template
-
Field Details
-
oid
-
parameters
-
sequence
-
TAG
-
templateInstance
-
-
Constructor Details
-
AlgorithmIdentifier
Creates an AlgorithmIdentifier with no parameter. -
AlgorithmIdentifier
Creates an AlgorithmIdentifier.- Parameters:
parameters
- The algorithm parameters. A value ofnull
will be encoded with an ASN.1NULL
.
-
-
Method Details
-
getTag
Description copied from interface:ASN1Value
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. -
getOID
-
getParameters
If this instance was constructed, returns the parameter passed in to the constructor. 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. -
getTemplate
-
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using its own base tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using an implicit tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
implicit
- Implicit tag.ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-