cryptix.asn1.encoding

Class DER

public class DER extends BaseCoder

A concrete factory class to handle ASN.1 DER encoding.

Portions of this class's code are ported from the "Unsupported Release of the Certificate Library" in C++ from Sun Microsystems' Internet Commerce Group (see copyright notice later). Copyright ©1997, 1998, 1999 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.3 $

Author: Raif S. Naffah Eric Rescorla

Nested Class Summary
classDER.Component
Method Summary
voiddecode(ASNBoolean obj, InputStream in)
Decodes a BOOLEAN --internally represented as a Boolean.
voiddecode(ASNInteger obj, InputStream in)
Decodes an INTEGER -- internally represented as a BigInteger.
voiddecode(ASNBitString obj, InputStream in)
Decodes a BIT STRING --internally represented as a byte[].
voiddecode(ASNOctetString obj, InputStream in)
Decodes an OCTET STRING --internally represented as a byte[].
voiddecode(ASNNull obj, InputStream in)
Decodes a NULL --internally represented as a null.
voiddecode(ASNObjectIdentifier obj, InputStream in)
Decodes an OID --internally represented as a dot-separated String.
voiddecode(ASNSequence obj, InputStream in)
Decodes a SEQUENCE --internally represented as an array.
voiddecode(ASNSequenceOf obj, InputStream in)
Decodes a SEQUENCE OF --internally represented as an array.
voiddecode(ASNSet obj, InputStream in)
Decodes a SET --internally represented as an array.
voiddecode(ASNSetOf obj, InputStream in)
Decodes a SET OF --internally represented as an array.
voiddecode(ASNTaggedType obj, InputStream in)
Decodes a Tagged Type -- rewritten by EKR
voiddecode(ASNAny obj, InputStream in)
Decodes an ANY, represented as byte[] -- EKR
voiddecode(ASNPrintableString obj, InputStream in)
Decodes a PrintableString --internally represented as a String.
voiddecode(ASNTime obj, InputStream in)
Decodes a UTCTime --internally represented as a Date.
voiddecode(InputStream in, int level)
voiddecodeExplicitTaggedType(ASNTaggedType obj, InputStream in)
Decodes an EXPLICIT Tagged Type.
booleandecodeImplicitTaggedType(ASNTaggedType obj, InputStream in)
Decodes an IMPLICIT Tagged Type.
voidencode(ASNBoolean obj, OutputStream out)
Encodes a BOOLEAN.
voidencode(ASNOctetString obj, OutputStream out)
Encodes an OCTET STRING.
voidencode(ASNNull obj, OutputStream out)
Encodes a NULL.
voidencode(ASNObjectIdentifier obj, OutputStream out)
Encodes an OID.
voidencode(ASNSequence obj, OutputStream out)
Encodes a SEQUENCE.
voidencode(ASNTaggedType obj, OutputStream out)
Encodes an ASN.1 Tagged type.
voidencode(ASNTime obj, OutputStream out)
Encodes a UTCTime.

Method Detail

decode

public void decode(ASNBoolean obj, InputStream in)
Decodes a BOOLEAN --internally represented as a Boolean.

decode

public void decode(ASNInteger obj, InputStream in)
Decodes an INTEGER -- internally represented as a BigInteger.

decode

public void decode(ASNBitString obj, InputStream in)
Decodes a BIT STRING --internally represented as a byte[].

decode

public void decode(ASNOctetString obj, InputStream in)
Decodes an OCTET STRING --internally represented as a byte[].

decode

public void decode(ASNNull obj, InputStream in)
Decodes a NULL --internally represented as a null.

decode

public void decode(ASNObjectIdentifier obj, InputStream in)
Decodes an OID --internally represented as a dot-separated String.

decode

public void decode(ASNSequence obj, InputStream in)
Decodes a SEQUENCE --internally represented as an array.

decode

public void decode(ASNSequenceOf obj, InputStream in)
Decodes a SEQUENCE OF --internally represented as an array.

decode

public void decode(ASNSet obj, InputStream in)
Decodes a SET --internally represented as an array.

decode

public void decode(ASNSetOf obj, InputStream in)
Decodes a SET OF --internally represented as an array.

decode

public void decode(ASNTaggedType obj, InputStream in)
Decodes a Tagged Type -- rewritten by EKR

decode

public void decode(ASNAny obj, InputStream in)
Decodes an ANY, represented as byte[] -- EKR

decode

public void decode(ASNPrintableString obj, InputStream in)
Decodes a PrintableString --internally represented as a String.

decode

public void decode(ASNTime obj, InputStream in)
Decodes a UTCTime --internally represented as a Date.

decode

public void decode(InputStream in, int level)

decodeExplicitTaggedType

public void decodeExplicitTaggedType(ASNTaggedType obj, InputStream in)
Decodes an EXPLICIT Tagged Type.

decodeImplicitTaggedType

public boolean decodeImplicitTaggedType(ASNTaggedType obj, InputStream in)
Decodes an IMPLICIT Tagged Type.

encode

public void encode(ASNBoolean obj, OutputStream out)
Encodes a BOOLEAN.

encode

public void encode(ASNOctetString obj, OutputStream out)
Encodes an OCTET STRING.

encode

public void encode(ASNNull obj, OutputStream out)
Encodes a NULL.

encode

public void encode(ASNObjectIdentifier obj, OutputStream out)
Encodes an OID. OIDs are represented as dotted strings.

encode

public void encode(ASNSequence obj, OutputStream out)
Encodes a SEQUENCE.

encode

public void encode(ASNTaggedType obj, OutputStream out)
Encodes an ASN.1 Tagged type.

encode

public void encode(ASNTime obj, OutputStream out)
Encodes a UTCTime.