com.mindbright.asn1
Class ASN1DER
java.lang.Object
com.mindbright.asn1.ASN1DER
- All Implemented Interfaces:
- ASN1Decoder, ASN1Encoder
- public class ASN1DER
- extends java.lang.Object
- implements ASN1Encoder, ASN1Decoder
Method Summary |
int |
decode(java.io.InputStream in,
ASN1Object object)
|
boolean |
decodeBoolean(java.io.InputStream in,
int len)
|
java.math.BigInteger |
decodeInteger(java.io.InputStream in,
int len)
|
int[] |
decodeLength(java.io.InputStream in)
|
void |
decodeNull(java.io.InputStream in,
int len)
|
int[] |
decodeOID(java.io.InputStream in,
int len)
|
byte[] |
decodeString(java.io.InputStream in,
int len)
|
void |
decodeStructure(java.io.InputStream in,
int len,
ASN1Structure struct)
|
int |
decodeTag(java.io.InputStream in)
|
void |
decodeValue(java.io.InputStream in,
int tag,
int len,
ASN1Object object)
|
int |
encode(java.io.OutputStream out,
ASN1Object object)
|
int |
encodeBoolean(java.io.OutputStream out,
boolean b)
|
int |
encodeInteger(java.io.OutputStream out,
java.math.BigInteger i)
|
int |
encodeLength(java.io.OutputStream out,
int len)
|
int |
encodeNull(java.io.OutputStream out)
|
int |
encodeOID(java.io.OutputStream out,
int[] oid)
|
int |
encodeString(java.io.OutputStream out,
byte[] string)
|
int |
encodeStructure(java.io.OutputStream out,
ASN1Structure struct)
|
static void |
main(java.lang.String[] argv)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BOOL_TRUE
protected static final byte[] BOOL_TRUE
BOOL_FALSE
protected static final byte[] BOOL_FALSE
INDEFINITE_LEN
protected static final int INDEFINITE_LEN
- See Also:
- Constant Field Values
ASN1DER
public ASN1DER()
encode
public int encode(java.io.OutputStream out,
ASN1Object object)
throws java.io.IOException
- Specified by:
encode
in interface ASN1Encoder
- Throws:
java.io.IOException
encodeLength
public int encodeLength(java.io.OutputStream out,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
encodeBoolean
public int encodeBoolean(java.io.OutputStream out,
boolean b)
throws java.io.IOException
- Specified by:
encodeBoolean
in interface ASN1Encoder
- Throws:
java.io.IOException
encodeInteger
public int encodeInteger(java.io.OutputStream out,
java.math.BigInteger i)
throws java.io.IOException
- Specified by:
encodeInteger
in interface ASN1Encoder
- Throws:
java.io.IOException
encodeNull
public int encodeNull(java.io.OutputStream out)
throws java.io.IOException
- Specified by:
encodeNull
in interface ASN1Encoder
- Throws:
java.io.IOException
encodeOID
public int encodeOID(java.io.OutputStream out,
int[] oid)
throws java.io.IOException
- Specified by:
encodeOID
in interface ASN1Encoder
- Throws:
java.io.IOException
encodeString
public int encodeString(java.io.OutputStream out,
byte[] string)
throws java.io.IOException
- Specified by:
encodeString
in interface ASN1Encoder
- Throws:
java.io.IOException
encodeStructure
public int encodeStructure(java.io.OutputStream out,
ASN1Structure struct)
throws java.io.IOException
- Specified by:
encodeStructure
in interface ASN1Encoder
- Throws:
java.io.IOException
decode
public int decode(java.io.InputStream in,
ASN1Object object)
throws java.io.IOException
- Specified by:
decode
in interface ASN1Decoder
- Throws:
java.io.IOException
decodeTag
public int decodeTag(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
decodeLength
public int[] decodeLength(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
decodeValue
public void decodeValue(java.io.InputStream in,
int tag,
int len,
ASN1Object object)
throws java.io.IOException
- Specified by:
decodeValue
in interface ASN1Decoder
- Throws:
java.io.IOException
decodeBoolean
public boolean decodeBoolean(java.io.InputStream in,
int len)
throws java.io.IOException
- Specified by:
decodeBoolean
in interface ASN1Decoder
- Throws:
java.io.IOException
decodeInteger
public java.math.BigInteger decodeInteger(java.io.InputStream in,
int len)
throws java.io.IOException
- Specified by:
decodeInteger
in interface ASN1Decoder
- Throws:
java.io.IOException
decodeNull
public void decodeNull(java.io.InputStream in,
int len)
throws java.io.IOException
- Specified by:
decodeNull
in interface ASN1Decoder
- Throws:
java.io.IOException
decodeOID
public int[] decodeOID(java.io.InputStream in,
int len)
throws java.io.IOException
- Specified by:
decodeOID
in interface ASN1Decoder
- Throws:
java.io.IOException
decodeString
public byte[] decodeString(java.io.InputStream in,
int len)
throws java.io.IOException
- Specified by:
decodeString
in interface ASN1Decoder
- Throws:
java.io.IOException
decodeStructure
public void decodeStructure(java.io.InputStream in,
int len,
ASN1Structure struct)
throws java.io.IOException
- Specified by:
decodeStructure
in interface ASN1Decoder
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] argv)