DEREncoder
Overview
DEREncoder is a class in Aspose.Pdf FOSS for Java.
Encodes ASN.1 DER (Distinguished Encoding Rules) structures.
Methods
| Signature | Description |
|---|---|
encodeSequence() → byte[] | Encodes a SEQUENCE (tag 0x30) containing the given contents. |
encodeSet() → byte[] | Encodes a SET (tag 0x31) containing the given contents. |
encodeOID(oid: String) → byte[] | Encodes an OID from dotted string. |
encodeInteger(value: BigInteger) → byte[] | Encodes an INTEGER. |
encodeInteger(value: int) → byte[] | Encodes a small integer. |
encodeOctetString(data: byte[]) → byte[] | Encodes an OCTET STRING. |
encodeBitString(data: byte[]) → byte[] | Encodes a BIT STRING (with unused-bits prefix byte 0x00). |
encodeNull() → byte[] | Encodes NULL. |
encodeContextTag(tagNumber: int, content: byte[]) → byte[] | Encodes a context-specific constructed tag [n] EXPLICIT. |
encodeContextTagImplicit(tagNumber: int, content: byte[]) → byte[] | Encodes a context-specific implicit tag [n] IMPLICIT (preserves inner content). |
encodeUTCTime(date: Date) → byte[] | Encodes a UTCTime value. |
encodePrintableString(s: String) → byte[] | Encodes a PrintableString. |
encodeUTF8String(s: String) → byte[] | Encodes a UTF8String. |
encodeAlgorithmIdentifier(oid: String) → byte[] | Encodes an AlgorithmIdentifier SEQUENCE { OID, NULL }. |
encodeTLV(tag: int, value: byte[]) → byte[] | Encodes a Tag-Length-Value triple. |
encodeLength(length: int) → byte[] | Encodes a DER length value. |