| java.lang.Object dummyCA.TLV
TLV | class TLV (Code) | | Used to represent each Type, Length, Value structure in a DER buffer.
|
Field Summary | |
final static int | ANY_STRING_TYPE ANY_STRING type used as a place holder. | final static int | BITSTRING_TYPE ASN BIT STRING type used in certificate parsing. | final static int | BMPSTR_TYPE ASN BIT STRING type used in certificate parsing. | final static int | BOOLEAN_TYPE ASN BOOLEAN type used in certificate parsing. | final static int | CONSTRUCTED ASN constructed flag used in types (0x20). | final static int | CONTEXT ASN context specific flag used in types (0x80). | final static int | EXPLICIT ASN constructed flag used in types (0x20). | final static int | EXTENSIONS_TYPE Context specific explicit type for certificate extensions. | final static int | GEN_TIME_TYPE ASN Generalized time type used in certificate parsing. | final static int | IA5STR_TYPE ASN IA5 STRING type used in certificate parsing. | final static int | INTEGER_TYPE ASN INTEGER type used in certificate parsing. | final static int | NULL_TYPE ASN NULL type used in certificate parsing. | final static int | OCTETSTR_TYPE ASN OCTET STRING type used in certificate parsing. | final static int | OID_TYPE ASN OBJECT ID type used in certificate parsing. | final static int | PRINTSTR_TYPE ASN PrintableString type used in certificate parsing. | final static int | SEQUENCE_TYPE ASN SEQUENCE type used in certificate parsing. | final static int | SET_TYPE ASN SET type used in certificate parsing. | final static int | TELETEXSTR_TYPE ASN TELETEX STRING type used in certificate parsing. | int | TLSize Size of tag and length in DER encoding. | final static int | UCT_TIME_TYPE | final static int | UNIVSTR_TYPE ASN UniversalString type used in certificate parsing. | final static int | UTF8STR_TYPE ASN UTF8String type used in certificate parsing. | final static int | VERSION_TYPE Context specific explicit type for certificate version. | TLV | child Non-null for constructed types, the first child TLV. | byte[] | data Buffer that contains the DER encoded TLV. | static char[] | hc Hexadecimal digits. | int | length Number of bytes that make up the value. | TLV | next The next TLV in the parent sequence. | int | type Raw DER type. | int | valueOffset Offset of the value. |
Constructor Summary | |
| TLV(byte[] buffer, int offset) Constructs a TLV structure, recursing down for constructed types. | | TLV(int tag) Constructs a TLV structure. | public | TLV(int tag, byte[] bytes) Constructs a TLV structure. |
Method Summary | |
static String | OIDtoString(byte[] buffer, int offset, int length) Converts a subsequence of bytes into a printable OID,
a string of decimal digits, each separated by a ".". | static byte[] | StringToOID(String oid) Converts a printable OID into a subsequence of bytes. | TLV | copy() Creates a copy of this TLV. | public static TLV | createUTCTime(Calendar time) Creates UTCTime TLV structure for given date. | byte[] | getDERData() Returns DER encoded TLV. | String | getOID() Returns string representation of OID represented by this TLV. | byte[] | getValue() Returns the value field of this TLV. | static String | hexEncode(byte[] b, int off, int len, int max) Converts a subsequence of bytes in a byte array into a
corresponding string of hexadecimal digits, each separated by a ":".
Parameters: b - byte array containing the bytes to be converted Parameters: off - starting offset of the byte subsequence inside b Parameters: len - number of bytes to be converted Parameters: max - print a single "+" instead of the bytes after max,-1 for no max. | void | print() Print the a TLV structure, recursing down for constructed types. | void | print(PrintStream out) Print the a TLV structure, recursing down for constructed types. |
ANY_STRING_TYPE | final static int ANY_STRING_TYPE(Code) | | ANY_STRING type used as a place holder. [UNIVERSAL 0]
|
BITSTRING_TYPE | final static int BITSTRING_TYPE(Code) | | ASN BIT STRING type used in certificate parsing. [UNIVERSAL 3]
|
BMPSTR_TYPE | final static int BMPSTR_TYPE(Code) | | ASN BIT STRING type used in certificate parsing. [UNIVERSAL 30]
|
BOOLEAN_TYPE | final static int BOOLEAN_TYPE(Code) | | ASN BOOLEAN type used in certificate parsing. [UNIVERSAL 1]
|
CONSTRUCTED | final static int CONSTRUCTED(Code) | | ASN constructed flag used in types (0x20).
|
CONTEXT | final static int CONTEXT(Code) | | ASN context specific flag used in types (0x80).
|
EXPLICIT | final static int EXPLICIT(Code) | | ASN constructed flag used in types (0x20).
|
EXTENSIONS_TYPE | final static int EXTENSIONS_TYPE(Code) | | Context specific explicit type for certificate extensions.
[CONTEXT EXPLICIT 3]
|
GEN_TIME_TYPE | final static int GEN_TIME_TYPE(Code) | | ASN Generalized time type used in certificate parsing.
[UNIVERSAL 24]
|
IA5STR_TYPE | final static int IA5STR_TYPE(Code) | | ASN IA5 STRING type used in certificate parsing. [UNIVERSAL 22]
|
INTEGER_TYPE | final static int INTEGER_TYPE(Code) | | ASN INTEGER type used in certificate parsing. [UNIVERSAL 2]
|
NULL_TYPE | final static int NULL_TYPE(Code) | | ASN NULL type used in certificate parsing. [UNIVERSAL 5]
|
OCTETSTR_TYPE | final static int OCTETSTR_TYPE(Code) | | ASN OCTET STRING type used in certificate parsing. [UNIVERSAL 4]
|
OID_TYPE | final static int OID_TYPE(Code) | | ASN OBJECT ID type used in certificate parsing. [UNIVERSAL 6]
|
PRINTSTR_TYPE | final static int PRINTSTR_TYPE(Code) | | ASN PrintableString type used in certificate parsing. [UNIVERSAL 19]
|
SEQUENCE_TYPE | final static int SEQUENCE_TYPE(Code) | | ASN SEQUENCE type used in certificate parsing.
[UNIVERSAL CONSTRUCTED 16]
|
SET_TYPE | final static int SET_TYPE(Code) | | ASN SET type used in certificate parsing.
[UNIVERSAL CONSTRUCTED 17]
|
TELETEXSTR_TYPE | final static int TELETEXSTR_TYPE(Code) | | ASN TELETEX STRING type used in certificate parsing. [UNIVERSAL 20]
|
TLSize | int TLSize(Code) | | Size of tag and length in DER encoding.
|
UCT_TIME_TYPE | final static int UCT_TIME_TYPE(Code) | | ASN UCT time type used in certificate parsing [UNIVERSAL 23]
|
UNIVSTR_TYPE | final static int UNIVSTR_TYPE(Code) | | ASN UniversalString type used in certificate parsing.
[UNIVERSAL 28].
|
UTF8STR_TYPE | final static int UTF8STR_TYPE(Code) | | ASN UTF8String type used in certificate parsing. [UNIVERSAL 12]
|
VERSION_TYPE | final static int VERSION_TYPE(Code) | | Context specific explicit type for certificate version.
[CONTEXT EXPLICIT 0]
|
child | TLV child(Code) | | Non-null for constructed types, the first child TLV.
|
data | byte[] data(Code) | | Buffer that contains the DER encoded TLV.
|
hc | static char[] hc(Code) | | Hexadecimal digits.
|
length | int length(Code) | | Number of bytes that make up the value.
|
next | TLV next(Code) | | The next TLV in the parent sequence.
|
type | int type(Code) | | Raw DER type.
|
valueOffset | int valueOffset(Code) | | Offset of the value.
|
TLV | TLV(byte[] buffer, int offset)(Code) | | Constructs a TLV structure, recursing down for constructed types.
Parameters: buffer - DER buffer Parameters: offset - where to start parsing exception: IndexOutOfBoundException - if the DER is corrupt |
TLV | TLV(int tag)(Code) | | Constructs a TLV structure.
Parameters: tag - tag of new TLV |
TLV | public TLV(int tag, byte[] bytes)(Code) | | Constructs a TLV structure.
Parameters: tag - tag of new TLV Parameters: bytes - value of new TLV |
OIDtoString | static String OIDtoString(byte[] buffer, int offset, int length)(Code) | | Converts a subsequence of bytes into a printable OID,
a string of decimal digits, each separated by a ".".
Parameters: buffer - byte array containing the bytes to be converted Parameters: offset - starting offset of the byte subsequence inside b Parameters: length - number of bytes to be converted printable OID |
StringToOID | static byte[] StringToOID(String oid)(Code) | | Converts a printable OID into a subsequence of bytes.
Parameters: oid - printable OID byte array containing the OID |
copy | TLV copy()(Code) | | Creates a copy of this TLV. The value of field next of the new TLV is
null.
a copy of this TLV |
createUTCTime | public static TLV createUTCTime(Calendar time)(Code) | | Creates UTCTime TLV structure for given date.
Parameters: time - date |
getDERData | byte[] getDERData()(Code) | | Returns DER encoded TLV.
DER encoded TLV |
getOID | String getOID() throws IOException(Code) | | Returns string representation of OID represented by this TLV.
string representation of OID represented by this TLV throws: IOException - if TLV doesn't contain OID |
getValue | byte[] getValue()(Code) | | Returns the value field of this TLV.
the value field of this TLV |
hexEncode | static String hexEncode(byte[] b, int off, int len, int max)(Code) | | Converts a subsequence of bytes in a byte array into a
corresponding string of hexadecimal digits, each separated by a ":".
Parameters: b - byte array containing the bytes to be converted Parameters: off - starting offset of the byte subsequence inside b Parameters: len - number of bytes to be converted Parameters: max - print a single "+" instead of the bytes after max,-1 for no max. a string of corresponding hexadecimal digits oran error string |
print | void print()(Code) | | Print the a TLV structure, recursing down for constructed types.
|
print | void print(PrintStream out)(Code) | | Print the a TLV structure, recursing down for constructed types.
Parameters: out - output stream |
|
|