Package org.ldaptive.asn1
Class AbstractDERType
java.lang.Object
org.ldaptive.asn1.AbstractDERType
- Direct Known Subclasses:
BooleanType,ConstructedDEREncoder,ContextType,IntegerType,NullType,OctetStringType,OidType,UuidType
Provides functionality common to DER types implementations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intConstructed tag.private static final intLength of short form integers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]encode(byte[]... items) DER encodes the supplied items with the tag associated with this type.
-
Field Details
-
SHORT_FORM_INT_LENGTH
private static final int SHORT_FORM_INT_LENGTHLength of short form integers.- See Also:
-
derTag
private final int derTagConstructed tag.
-
-
Constructor Details
-
AbstractDERType
Creates a new abstract der type.- Parameters:
tag- to encode for this type
-
-
Method Details
-
encode
protected byte[] encode(byte[]... items) DER encodes the supplied items with the tag associated with this type. If the length is greater than 127 bytes the long form is always expressed using 4 bytes.- Parameters:
items- to encode- Returns:
- DER encoded items
-