DerOutputStream

Output stream marshaling DER-encoded data. This is eventually provided in the form of a byte array; there is no advance limit on the size of that byte array.

<P>At this time, this class supports only a subset of the types of DER data encodings which are defined. That subset is sufficient for generating most X.509 certificates.

More...

Constructors

this
this(int size)

Construct an DER output stream.

this
this()

Construct an DER output stream.

Members

Aliases

write
alias write = ByteArrayOutputStream.write
Undocumented in source.

Functions

derEncode
void derEncode(OutputStream ot)

Write the current contents of this <code>DerOutputStream</code> to an <code>OutputStream</code>.

putBMPString
void putBMPString(string s)

Marshals a string as a DER encoded BMPString.

putBitString
void putBitString(byte[] bits)

Marshals a DER bit string on the output stream. The bit string must be byte-aligned.

putBoolean
void putBoolean(bool val)

Marshals a DER bool on the output stream.

putDerValue
void putDerValue(DerValue val)

Marshals pre-encoded DER value onto the output stream.

putEnumerated
void putEnumerated(int i)

Marshals a DER enumerated on the output stream. @param i the enumerated value.

putGeneralString
void putGeneralString(string s)

Marshals a string as a DER encoded GeneralString.

putGeneralizedTime
void putGeneralizedTime(Date d)

Marshals a DER Generalized Time/date value.

putIA5String
void putIA5String(string s)

Marshals a string as a DER encoded IA5String.

putInteger
void putInteger(int i)

Marshals a DER integer on the output stream. @param i the integer.

putLength
void putLength(int len)

Put the encoding of the length in the stream.

putNull
void putNull()

Marshals a DER "null" value on the output stream. These are often used to indicate optional values which have been omitted.

putOctetString
void putOctetString(byte[] octets)

DER-encodes an ASN.1 OCTET STRING value on the output stream.

putPrintableString
void putPrintableString(string s)

Marshals a string as a DER encoded PrintableString.

putT61String
void putT61String(string s)

Marshals a string as a DER encoded T61String.

putTag
void putTag(byte tagClass, bool form, byte val)

Put the tag of the attribute in the stream.

putUTCTime
void putUTCTime(Date d)

Marshals a DER UTC time/date value.

putUTF8String
void putUTF8String(string s)

Marshals a string as a DER encoded UTF8String.

putUnalignedBitString
void putUnalignedBitString(BitArray ba)

Marshals a DER bit string on the output stream. The bit strings need not be byte-aligned.

write
void write(byte tag, byte[] buf)

Writes tagged, pre-marshaled data. This calcuates and encodes the length, so that the output data is the standard triple of { tag, length, data } used by all DER values.

write
void write(byte tag, DerOutputStream ot)

Writes tagged data using buffer-to-buffer copy. As above, this writes a standard DER record. This is often used when efficiently encapsulating values in sequences.

writeImplicit
void writeImplicit(byte tag, DerOutputStream value)

Writes implicitly tagged data using buffer-to-buffer copy. As above, this writes a standard DER record. This is often used when efficiently encapsulating implicitly tagged values.

Inherited Members

From DerEncoder

derEncode
void derEncode(OutputStream ot)

DER encode this object and write the results to a stream.

Detailed Description

@author David Brownell @author Amit Kapoor @author Hemma Prafullchandra

Meta