public final class Asn1Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.bouncycastle.asn1.ASN1Primitive |
decode(byte[] extension)
Decodes the byte array extension using the
ASN1InputStream. |
static byte[] |
encode(org.bouncycastle.asn1.ASN1Encodable value) |
static org.bouncycastle.asn1.DERBitString |
encodeIpAddress(net.ripe.ipresource.IpRange prefix)
IPAddress ::= BIT STRING
|
static <T extends org.bouncycastle.asn1.ASN1Encodable> |
expect(org.bouncycastle.asn1.ASN1Encodable value,
Class<? extends T> expectedClass)
Checks if
value is an instance of the
expectedClass. |
static net.ripe.ipresource.Asn |
parseAsId(org.bouncycastle.asn1.ASN1Encodable der)
ASId ::= INTEGER
|
static net.ripe.ipresource.IpAddress |
parseIpAddress(net.ripe.ipresource.IpResourceType type,
org.bouncycastle.asn1.ASN1Encodable der,
boolean padWithOnes)
IPAddress ::= BIT STRING
|
static net.ripe.ipresource.IpRange |
parseIpAddressAsPrefix(net.ripe.ipresource.IpResourceType type,
org.bouncycastle.asn1.ASN1Encodable der)
IpAddress used as a prefix. |
static org.bouncycastle.asn1.DERBitString |
resourceToBitString(net.ripe.ipresource.UniqueIpResource resource,
int bitCount) |
public static byte[] encode(org.bouncycastle.asn1.ASN1Encodable value)
public static org.bouncycastle.asn1.DERBitString resourceToBitString(net.ripe.ipresource.UniqueIpResource resource,
int bitCount)
public static org.bouncycastle.asn1.ASN1Primitive decode(byte[] extension)
ASN1InputStream.public static <T extends org.bouncycastle.asn1.ASN1Encodable> T expect(org.bouncycastle.asn1.ASN1Encodable value,
Class<? extends T> expectedClass)
value is an instance of the
expectedClass.IllegalArgumentException - the instance is null or not an instance of the expected
class.public static net.ripe.ipresource.IpRange parseIpAddressAsPrefix(net.ripe.ipresource.IpResourceType type,
org.bouncycastle.asn1.ASN1Encodable der)
IpAddress used as a prefix.public static net.ripe.ipresource.IpAddress parseIpAddress(net.ripe.ipresource.IpResourceType type,
org.bouncycastle.asn1.ASN1Encodable der,
boolean padWithOnes)
public static net.ripe.ipresource.Asn parseAsId(org.bouncycastle.asn1.ASN1Encodable der)
IllegalArgumentException - when the wrong encoding is used or value is not a valid 32-bit ASN.public static org.bouncycastle.asn1.DERBitString encodeIpAddress(net.ripe.ipresource.IpRange prefix)
Copyright © 2008–2023 RIPE Network Coordination Centre (RIPE NCC). All rights reserved.