本文整理了Java中org.bouncycastle.asn1.ASN1ObjectIdentifier.fromByteArray()
方法的一些代码示例,展示了ASN1ObjectIdentifier.fromByteArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ASN1ObjectIdentifier.fromByteArray()
方法的具体详情如下:
包路径:org.bouncycastle.asn1.ASN1ObjectIdentifier
类名称:ASN1ObjectIdentifier
方法名:fromByteArray
暂无
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
try
return (ASN1ObjectIdentifier)fromByteArray(enc);
代码示例来源:origin: redfish64/TinyTravelTracker
try
return (ASN1ObjectIdentifier)fromByteArray(enc);
代码示例来源:origin: martinpaljak/GlobalPlatformPro
public static String oid2string(byte[] oid) {
try {
// Prepend 0x06 tag, if not present
// XXX: if ber-tlv allows to fetch constructed data, this is not needed
if (oid[0] != 0x06) {
oid = GPUtils.concatenate(new byte[]{0x06, (byte) oid.length}, oid);
}
ASN1ObjectIdentifier realoid = (ASN1ObjectIdentifier) ASN1ObjectIdentifier.fromByteArray(oid);
if (realoid == null)
throw new IllegalArgumentException("Could not parse OID from " + HexUtils.bin2hex(oid));
return realoid.toString();
} catch (IOException e) {
throw new IllegalArgumentException("Could not handle " + HexUtils.bin2hex(oid));
}
}
内容来源于网络,如有侵权,请联系作者删除!