public class ASN1Util extends Object
Constructor and Description |
---|
ASN1Util() |
Modifier and Type | Method and Description |
---|---|
static org.bouncycastle.asn1.ASN1Object |
decode(InputStream in)
读取ASN.1数据流为
ASN1Object |
static byte[] |
encode(String asn1Encoding,
org.bouncycastle.asn1.ASN1Encodable... elements)
编码为指定ASN1格式
|
static byte[] |
encodeDer(org.bouncycastle.asn1.ASN1Encodable... elements)
编码为DER格式
|
static void |
encodeTo(String asn1Encoding,
OutputStream out,
org.bouncycastle.asn1.ASN1Encodable... elements)
编码为指定ASN1格式
|
static String |
getDumpStr(InputStream in)
获取ASN1格式的导出格式,一般用于调试
|
public static byte[] encodeDer(org.bouncycastle.asn1.ASN1Encodable... elements)
elements
- ASN.1元素public static byte[] encode(String asn1Encoding, org.bouncycastle.asn1.ASN1Encodable... elements)
asn1Encoding
- 编码格式,见ASN1Encoding
,可选DER、BER或DLelements
- ASN.1元素public static void encodeTo(String asn1Encoding, OutputStream out, org.bouncycastle.asn1.ASN1Encodable... elements)
asn1Encoding
- 编码格式,见ASN1Encoding
,可选DER、BER或DLout
- 输出流elements
- ASN.1元素public static org.bouncycastle.asn1.ASN1Object decode(InputStream in)
ASN1Object
in
- ASN.1数据ASN1Object
public static String getDumpStr(InputStream in)
in
- ASN.1数据ASN1Object
的字符串表示形式ASN1Dump.dumpAsString(Object)
Copyright © 2024. All rights reserved.