COM.claymoresystems.cert

Class DERUtils

public class DERUtils extends Object

Simple DER encode utilities. Eventually we'd like to use one common ASN.1 engine for everything
Field Summary
static byteBIT_STRING
static byteBOOLEAN
static byteIA5STRING
static byteINTEGER
static byteOCTET_STRING
static byteOID
static bytePRINTABLE_STRING
static byteSEQUENCE
static byteSET
static byteT61STRING
static byteUTCTIME
Method Summary
static byte[]decodeAny(InputStream is)
static byte[]decodeBitString(InputStream is)
static BitSetdecodeBitStringX(InputStream is)
static booleandecodeBoolean(InputStream is)
static BigIntegerdecodeInteger(InputStream is)
static intdecodeIntegerX(InputStream is)
static byte[]decodeOctetString(InputStream is)
static byte[]decodeOID(InputStream is)
static byte[]decodeSequence(InputStream is)
static voidencodeBitString(byte[] in, OutputStream os)
static voidencodeIA5String(String in, OutputStream os)
static voidencodeInteger(BigInteger i, OutputStream os)
static voidencodeOID(byte[] in, OutputStream os)
static voidencodeOID(String oid, OutputStream os)
static voidencodePrintableString(String in, OutputStream os)
static voidencodeSequence(byte[] in, OutputStream os)
static voidencodeSequence(ByteArrayOutputStream is, OutputStream os)
static voidencodeSet(byte[] in, OutputStream os)
static voidencodeSet(ByteArrayOutputStream is, OutputStream os)
static voidencodeUnknownString(String in, OutputStream os)
static voidencodeUTCTime(long time, OutputStream os)
static booleanisTag(int tag, InputStream is)

Field Detail

BIT_STRING

public static final byte BIT_STRING

BOOLEAN

public static final byte BOOLEAN

IA5STRING

public static final byte IA5STRING

INTEGER

public static final byte INTEGER

OCTET_STRING

public static final byte OCTET_STRING

OID

public static final byte OID

PRINTABLE_STRING

public static final byte PRINTABLE_STRING

SEQUENCE

public static final byte SEQUENCE

SET

public static final byte SET

T61STRING

public static final byte T61STRING

UTCTIME

public static final byte UTCTIME

Method Detail

decodeAny

public static byte[] decodeAny(InputStream is)

decodeBitString

public static byte[] decodeBitString(InputStream is)

decodeBitStringX

public static BitSet decodeBitStringX(InputStream is)

decodeBoolean

public static boolean decodeBoolean(InputStream is)

decodeInteger

public static BigInteger decodeInteger(InputStream is)

decodeIntegerX

public static int decodeIntegerX(InputStream is)

decodeOctetString

public static byte[] decodeOctetString(InputStream is)

decodeOID

public static byte[] decodeOID(InputStream is)

decodeSequence

public static byte[] decodeSequence(InputStream is)

encodeBitString

public static void encodeBitString(byte[] in, OutputStream os)

encodeIA5String

public static void encodeIA5String(String in, OutputStream os)

encodeInteger

public static void encodeInteger(BigInteger i, OutputStream os)

encodeOID

public static void encodeOID(byte[] in, OutputStream os)

encodeOID

public static void encodeOID(String oid, OutputStream os)

encodePrintableString

public static void encodePrintableString(String in, OutputStream os)

encodeSequence

public static void encodeSequence(byte[] in, OutputStream os)

encodeSequence

public static void encodeSequence(ByteArrayOutputStream is, OutputStream os)

encodeSet

public static void encodeSet(byte[] in, OutputStream os)

encodeSet

public static void encodeSet(ByteArrayOutputStream is, OutputStream os)

encodeUnknownString

public static void encodeUnknownString(String in, OutputStream os)

encodeUTCTime

public static void encodeUTCTime(long time, OutputStream os)

isTag

public static boolean isTag(int tag, InputStream is)
Copyright (c) 1999-2001 Claymore Systems, Inc., All Rights Reserved.