public interface AsnEncoder
Modifier and Type | Method and Description |
---|---|
int |
buildHeader(byte[] buf,
int startOffset,
byte asnType,
int asnLength)
The buildHeader() method is used to encode an ASN.1 header into the
specified byte buffer.
|
int |
buildInteger32(byte[] buf,
int startOffset,
byte asnType,
int asnInt32)
The buildInteger32() method is used to encode an ASN.1 32-bit signed
integer into the specified byte buffer.
|
int |
buildLength(byte[] buf,
int startOffset,
int asnLength)
The buildLength() method is used to encode an ASN.1 length into the
specified byte buffer.
|
int |
buildNull(byte[] buf,
int startOffset,
byte asnType)
The buildNull() method is used to encode an ASN.1 NULL value into the
specified byte buffer.
|
int |
buildObjectId(byte[] buf,
int startOffset,
byte asnType,
int[] oids)
The buildObjectId() method is used to encode an ASN.1 object id value
into the specified byte buffer.
|
int |
buildString(byte[] buf,
int startOffset,
byte asnType,
byte[] opaque)
The buildString() method is used to encode an ASN.1 string value into the
specified byte buffer.
|
int |
buildUInteger32(byte[] buf,
int startOffset,
byte asnType,
long asnUInt32)
The buildUInteger32() method is used to encode an ASN.1 32-bit unsigned
integer into the specified byte buffer.
|
int |
buildUInteger64(byte[] buf,
int startOffset,
byte asnType,
BigInteger asnUInt64)
The buildUInteger64() method is used to encode an ASN.1 64-bit unsigned
integer into the specified byte buffer.
|
Object[] |
parseHeader(byte[] buf,
int startOffset)
The parseHeader() method is used to decode an ASN.1 header from the
specified buffer.
|
Object[] |
parseInteger32(byte[] buf,
int startOffset)
The parseInteger32() method is used to decode an ASN.1 32-bit signed
integer from the specified buffer.
|
Object[] |
parseLength(byte[] buf,
int startOffset)
The parseLength() method is used to decode an ASN.1 length from the
specified buffer.
|
Object[] |
parseNull(byte[] buf,
int startOffset)
The parseNull() method is used to decode an ASN.1 Null value from the
specified buffer.
|
Object[] |
parseObjectId(byte[] buf,
int startOffset)
The parseObjectId() method is used to decode an ASN.1 Object Identifer
from the specified buffer.
|
Object[] |
parseString(byte[] buf,
int startOffset)
The parseString() method is used to decode an ASN.1 opaque string from
the specified buffer.
|
Object[] |
parseUInteger32(byte[] buf,
int startOffset)
The parseUInteger32() method is used to decode an ASN.1 32-bit unsigned
integer from the specified buffer.
|
Object[] |
parseUInteger64(byte[] buf,
int startOffset)
The parseUInteger64() method is used to decode an ASN.1 64-bit unsigned
integer from the specified buffer.
|
int buildLength(byte[] buf, int startOffset, int asnLength) throws AsnEncodingException
buf
- The output buffer of encoded bytes.startOffset
- The offset from the start of the buffer where the method
should start writing the encoded data.asnLength
- The length to be encoded.AsnEncodingException
- Thrown if an error occurs encoding the datatype.Object[] parseLength(byte[] buf, int startOffset) throws AsnDecodingException
buf
- The input bufferstartOffset
- The offset to start decoding in the bufferAsnDecodingException
- Thrown if an error occurs decoding the buffer.int buildHeader(byte[] buf, int startOffset, byte asnType, int asnLength) throws AsnEncodingException
buf
- The output buffer of encoded bytes.startOffset
- The offset from the start of the buffer where the method
should start writing the encoded data.asnType
- The ASN.1 type to place in the bufferasnLength
- The length to be encoded.AsnEncodingException
- Thrown if an error occurs encoding the datatype.Object[] parseHeader(byte[] buf, int startOffset) throws AsnDecodingException
buf
- The input bufferstartOffset
- The offset to start decoding in the bufferAsnDecodingException
- Thrown if an error occurs decoding the buffer.int buildInteger32(byte[] buf, int startOffset, byte asnType, int asnInt32) throws AsnEncodingException
buf
- The output buffer of encoded bytes.startOffset
- The offset from the start of the buffer where the method
should start writing the encoded data.asnType
- The ASN.1 type to place in the bufferasnInt32
- The 32-bit signed integer to encode.AsnEncodingException
- Thrown if an error occurs encoding the datatype.Object[] parseInteger32(byte[] buf, int startOffset) throws AsnDecodingException
buf
- The input bufferstartOffset
- The offset to start decoding in the bufferAsnDecodingException
- Thrown if an error occurs decoding the buffer.int buildUInteger32(byte[] buf, int startOffset, byte asnType, long asnUInt32) throws AsnEncodingException
buf
- The output buffer of encoded bytes.startOffset
- The offset from the start of the buffer where the method
should start writing the encoded data.asnType
- The ASN.1 type to place in the bufferasnUInt32
- The 32-bit unsigned integer to encode.AsnEncodingException
- Thrown if an error occurs encoding the datatype.Object[] parseUInteger32(byte[] buf, int startOffset) throws AsnDecodingException
buf
- The input bufferstartOffset
- The offset to start decoding in the bufferAsnDecodingException
- Thrown if an error occurs decoding the buffer.int buildUInteger64(byte[] buf, int startOffset, byte asnType, BigInteger asnUInt64) throws AsnEncodingException
buf
- The output buffer of encoded bytes.startOffset
- The offset from the start of the buffer where the method
should start writing the encoded data.asnType
- The ASN.1 type to place in the bufferasnUInt64
- The 64-bit unsigned integer to encode.AsnEncodingException
- Thrown if an error occurs encoding the datatype.Object[] parseUInteger64(byte[] buf, int startOffset) throws AsnDecodingException
buf
- The input bufferstartOffset
- The offset to start decoding in the bufferAsnDecodingException
- Thrown if an error occurs decoding the buffer.int buildNull(byte[] buf, int startOffset, byte asnType) throws AsnEncodingException
buf
- The output buffer of encoded bytes.startOffset
- The offset from the start of the buffer where the method
should start writing the encoded data.asnType
- The ASN.1 type to place in the bufferAsnEncodingException
- Thrown if an error occurs encoding the datatype.Object[] parseNull(byte[] buf, int startOffset) throws AsnDecodingException
buf
- The input bufferstartOffset
- The offset to start decoding in the bufferAsnDecodingException
- Thrown if an error occurs decoding the buffer.int buildString(byte[] buf, int startOffset, byte asnType, byte[] opaque) throws AsnEncodingException
buf
- The output buffer of encoded bytes.startOffset
- The offset from the start of the buffer where the method
should start writing the encoded data.asnType
- The ASN.1 type to place in the bufferopaque
- An array of bytes to encode into the string.AsnEncodingException
- Thrown if an error occurs encoding the datatype.Object[] parseString(byte[] buf, int startOffset) throws AsnDecodingException
buf
- The input bufferstartOffset
- The offset to start decoding in the bufferAsnDecodingException
- Thrown if an error occurs decoding the buffer.int buildObjectId(byte[] buf, int startOffset, byte asnType, int[] oids) throws AsnEncodingException
buf
- The output buffer of encoded bytes.startOffset
- The offset from the start of the buffer where the method
should start writing the encoded data.asnType
- The ASN.1 type to place in the bufferoids
- An array of integers to encode.AsnEncodingException
- Thrown if an error occurs encoding the datatype.Object[] parseObjectId(byte[] buf, int startOffset) throws AsnDecodingException
buf
- The input bufferstartOffset
- The offset to start decoding in the bufferAsnDecodingException
- Thrown if an error occurs decoding the buffer.Copyright © 2021. All rights reserved.