DerInputBuffer

DER input buffer ... this is the main abstraction in the DER library which actively works with the "untyped byte stream" abstraction. It does so with impunity, since it's not intended to be exposed to anyone who could violate the "typed value stream" DER model and hence corrupt the input stream of DER values.

@author David Brownell

Constructors

this
this(byte[] buf)
Undocumented in source.
this
this(byte[] buf, bool allowBER)
Undocumented in source.
this
this(byte[] buf, int offset, size_t len, bool allowBER)
Undocumented in source.

Members

Functions

dup
DerInputBuffer dup()
Undocumented in source. Be warned that the author may not have intended to support it.
equals
bool equals(DerInputBuffer other)
Undocumented in source. Be warned that the author may not have intended to support it.
getBigInteger
BigInteger getBigInteger(int len, bool makePositive)

Returns the integer which takes up the specified number of bytes in this buffer as a BigInteger. @param len the number of bytes to use. @param makePositive whether to always return a positive value, irrespective of actual encoding @return the integer as a BigInteger.

getBitString
byte[] getBitString(int len)

Returns the bit string which takes up the specified number of bytes in this buffer.

getBitString
byte[] getBitString()

Returns the bit string which takes up the rest of this buffer.

getInteger
int getInteger(int len)

Returns the integer which takes up the specified number of bytes in this buffer. @throws IOException if the result is not within the valid range for integer, i.e. between int.min and int.max. @param len the number of bytes to use. @return the integer.

getUnalignedBitString
BitArray getUnalignedBitString()

Returns the bit string which takes up the rest of this buffer. The bit string need not be byte-aligned.

opEquals
bool opEquals(Object other)

Compares this DerInputBuffer for equality with the specified object.

peek
int peek()
Undocumented in source. Be warned that the author may not have intended to support it.
toByteArray
byte[] toByteArray()
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()

Returns a hashcode for this DerInputBuffer.

truncate
void truncate(int len)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

allowBER
bool allowBER;
Undocumented in source.

Meta