public final class DerUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BIT_STRING_TAG |
static int |
BOOLEAN_TAG |
static int |
INTEGER_TAG |
static int |
NULL_TAG |
static int |
OBJECT_IDENTIFIER_TAG |
static int |
OCTET_STRING_TAG |
static int |
SEQUENCE_TAG |
static int |
UTC_TIME_TAG |
| Modifier and Type | Method and Description |
|---|---|
static List<byte[]> |
decodeSequence(byte[] sequence)
Decodes a sequence of encoded values.
|
static byte[] |
decodeSequenceOptionalElement(byte[] element)
Decodes a optional element of a sequence.
|
static byte[] |
encodeBitString(int padBits,
byte[] value)
Encodes a bit string padded with the specified number of bits.
|
static byte[] |
encodeBooleanTrue()
Encodes an integer.
|
static byte[] |
encodeContextSpecificSequence(int tag,
byte[]... encodedValues) |
static byte[] |
encodeContextSpecificTag(int tag,
byte[] body) |
static byte[] |
encodeInteger(BigInteger value)
Encodes an integer.
|
static byte[] |
encodeInteger(long value)
Encodes an integer.
|
static byte[] |
encodeLength(int length)
Encodes the length of a DER value.
|
static byte[] |
encodeNull() |
static byte[] |
encodeOctetString(byte[] value)
Encodes an octet string.
|
static byte[] |
encodeOid(String oid) |
static byte[] |
encodeSequence(byte[]... encodedValues)
Encodes a sequence of encoded values.
|
static byte[] |
encodeTag(int tag,
byte[] body) |
static byte[] |
encodeUtcTime(Instant value)
Encodes an octet string.
|
static byte[] |
encodeUtcTime(String value)
Encodes an octet string.
|
public static final int SEQUENCE_TAG
public static final int BOOLEAN_TAG
public static final int INTEGER_TAG
public static final int BIT_STRING_TAG
public static final int OCTET_STRING_TAG
public static final int NULL_TAG
public static final int OBJECT_IDENTIFIER_TAG
public static final int UTC_TIME_TAG
public static byte[] encodeSequence(byte[]... encodedValues)
public static List<byte[]> decodeSequence(byte[] sequence)
public static byte[] decodeSequenceOptionalElement(byte[] element)
public static byte[] encodeBitString(int padBits,
byte[] value)
public static byte[] encodeBooleanTrue()
public static byte[] encodeInteger(long value)
public static byte[] encodeInteger(BigInteger value)
public static byte[] encodeOctetString(byte[] value)
public static byte[] encodeUtcTime(String value)
public static byte[] encodeUtcTime(Instant value)
public static byte[] encodeLength(int length)
public static byte[] encodeOid(String oid)
public static byte[] encodeNull()
public static byte[] encodeTag(int tag,
byte[] body)
public static byte[] encodeContextSpecificTag(int tag,
byte[] body)
public static byte[] encodeContextSpecificSequence(int tag,
byte[]... encodedValues)
Copyright © 2010–2022 Airlift. All rights reserved.