public class DERParser extends Object
registerHandler(java.lang.String, org.ldaptive.asn1.ParseHandler)
methods. DERPath
strings are used to map handlers
to elements of interest.DERPath
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger
Logger for this class.
|
Constructor and Description |
---|
DERParser() |
Modifier and Type | Method and Description |
---|---|
void |
parse(ByteBuffer encoded)
Parse a DER-encoded data structure by calling registered handlers when points of interest are encountered in the
parse tree.
|
int |
readLength(ByteBuffer encoded)
Reads the length of a DER-encoded value from the given byte buffer.
|
DERTag |
readTag(ByteBuffer encoded)
Reads a DER tag from a single byte at the current position of the given buffer.
|
void |
registerHandler(DERPath path,
ParseHandler handler)
Registers the supplied handler to fire when the supplied path is encountered.
|
void |
registerHandler(String path,
ParseHandler handler)
|
public void registerHandler(String path, ParseHandler handler)
path
- to registerhandler
- to associate with the pathpublic void registerHandler(DERPath path, ParseHandler handler)
path
- to registerhandler
- to associate with the pathpublic void parse(ByteBuffer encoded)
encoded
- DER-encoded bytes.public DERTag readTag(ByteBuffer encoded)
encoded
- Buffer containing DER-encoded bytes positioned at tag.public int readLength(ByteBuffer encoded)
encoded
- buffer containing DER-encoded bytes positioned at start of length byte(s).Copyright © 2023. All rights reserved.