Class AbstractDERType

java.lang.Object
org.ldaptive.asn1.AbstractDERType
Direct Known Subclasses:
AttributeValueAssertion, BooleanType, ConstructedDEREncoder, ContextType, IntegerType, NullType, OctetStringType, OidType, UuidType

public abstract class AbstractDERType extends Object
Provides functionality common to DER types implementations.
  • Field Details

    • SHORT_FORM_INT_LENGTH

      private static final int SHORT_FORM_INT_LENGTH
      Length of short form integers.
      See Also:
    • derTag

      private final int derTag
      Constructed tag.
  • Constructor Details

    • AbstractDERType

      public AbstractDERType(DERTag tag)
      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