|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.crypt.util.DERHelper
public final class DERHelper
Utility class with methods to facilitate common operations on BouncyCastle DEREncodable objects.
| Method Summary | |
|---|---|
static int |
asInt(org.bouncycastle.asn1.DEREncodable e)
Extracts the integer value from a DERInteger. |
static byte[] |
asOctets(org.bouncycastle.asn1.DEREncodable e)
Extracts the octet string (byte array) from a DEROctetString. |
static org.bouncycastle.asn1.DERObject |
toDERObject(byte[] data,
boolean discardWrapper)
Attempts to create a Bouncy Castle DERObject from a byte array
representing ASN.1 encoded data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int asInt(org.bouncycastle.asn1.DEREncodable e)
DERInteger.
e - DERInteger instance.
public static byte[] asOctets(org.bouncycastle.asn1.DEREncodable e)
DEROctetString.
e - DEROctetString instance.
public static org.bouncycastle.asn1.DERObject toDERObject(byte[] data,
boolean discardWrapper)
throws IOException
DERObject from a byte array
representing ASN.1 encoded data.
data - ASN.1 encoded data as byte array.discardWrapper - Set to true to decode the octets of a DER octet
string as DER encoded data, thereby discarding the wrapping DER octet
string, false otherwise. Has no effect on other types of DER-encoded data.
IOException - On I/O errors.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||