Package org.ldaptive.asn1
Class AbstractDERType
java.lang.Object
org.ldaptive.asn1.AbstractDERType
- Direct Known Subclasses:
AttributeValueAssertion
,BooleanType
,ConstructedDEREncoder
,ContextType
,IntegerType
,NullType
,OctetStringType
,OidType
,UuidType
Provides functionality common to DER types implementations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
Constructed tag.private static final int
Length of short form integers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
encode
(byte[]... items) DER encode 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 encode 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
-